Ignore:
Timestamp:
Apr 13, 2015, 8:17:18 PM (9 years ago)
Author:
djay
Message:

Add readBase64 function, avoid calling it prior to fork . Add dumpMapsValuesToFiles function used to simplify OTB support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/zoo_service_loader.c

    r621 r631  
    19681968          if (lid < 0)
    19691969            {
    1970               fprintf (stderr, "ERROR %s %d\n", __FILE__, __LINE__);
    1971               fflush (stderr);
    1972               return -1;
     1970              return errorException (m, _("Lock failed"),
     1971                              "InternalError", NULL);
    19731972            }
    19741973          else
     
    19761975              if (lockShm (lid) < 0)
    19771976                {
    1978                   fprintf (stderr, "ERROR %s %d\n", __FILE__, __LINE__);
    1979                   fflush (stderr);
    1980                   return -1;
     1977                  return errorException (m, _("Lock failed"),
     1978                                         "InternalError", NULL);
    19811979                }
    1982               fflush (stderr);
    19831980            }
    19841981          f0 = freopen (fbkp, "w+", stdout);
     
    19871984          fclose (stdin);
    19881985#endif
     1986
     1987          /**
     1988           * set status to SERVICE_STARTED and flush stdout to ensure full
     1989           * content was outputed (the file used to store the ResponseDocument).
     1990           * The rewind stdout to restart writing from the bgining of the file,
     1991           * this way the data will be updated at the end of the process run.
     1992           */
     1993          printProcessResponse (m, request_inputs, cpid, s1, r_inputs1->value,
     1994                                SERVICE_STARTED, request_input_real_format,
     1995                                request_output_real_format);
     1996          fflush (stdout);
     1997          unlockShm (lid);
     1998          fflush (stderr);
     1999          fbkp1 =
     2000            (char *)
     2001            malloc ((strlen (r_inputs->value) + strlen (r_inputs1->value) +
     2002                     1024) * sizeof (char));
     2003          sprintf (fbkp1, "%s/%s_final_%d.xml", r_inputs->value,
     2004                   r_inputs1->value, cpid);
     2005
     2006          f1 = freopen (fbkp1, "w+", stdout);
    19892007          free (flog);
     2008
    19902009          if(validateRequest(&m,s1,request_inputs, &request_input_real_format,&request_output_real_format,&hInternet)<0){
    19912010            freeService (&s1);
     
    20062025            return -1;
    20072026          }
    2008       /**
    2009        * set status to SERVICE_STARTED and flush stdout to ensure full
    2010        * content was outputed (the file used to store the ResponseDocument).
    2011        * The rewind stdout to restart writing from the bgining of the file,
    2012        * this way the data will be updated at the end of the process run.
    2013        */
    2014           printProcessResponse (m, request_inputs, cpid, s1, r_inputs1->value,
    2015                                 SERVICE_STARTED, request_input_real_format,
    2016                                 request_output_real_format);
    2017           fflush (stdout);
    2018           unlockShm (lid);
    2019           fflush (stderr);
    2020           fbkp1 =
    2021             (char *)
    2022             malloc ((strlen (r_inputs->value) + strlen (r_inputs1->value) +
    2023                      1024) * sizeof (char));
    2024           sprintf (fbkp1, "%s/%s_final_%d.xml", r_inputs->value,
    2025                    r_inputs1->value, cpid);
    2026           f1 = freopen (fbkp1, "w+", stdout);
    20272027          loadServiceAndRun (&m, s1, request_inputs,
    20282028                             &request_input_real_format,
    20292029                             &request_output_real_format, &eres);
     2030
    20302031        }
    20312032      else
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png