Ignore:
Timestamp:
Oct 7, 2015, 8:41:43 AM (9 years ago)
Author:
david
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PublicaMundi_David_integration_01-devel/zoo-project/zoo-kernel/server_internal.c

    r657 r741  
    850850 * @param req the request (GetStatus / GetResult)
    851851 */
    852 void runGetStatus(maps* conf,char* pid,char* req){
     852void runGetStatus(maps* conf,char* pid,char* req,FCGX_Stream* out){
    853853  map* r_inputs = getMapFromMaps (conf, "main", "tmpPath");
    854854  char *sid=getStatusId(conf,pid);
    855855  if(sid==NULL){
    856856    errorException (conf, _("The JobID from the request does not match any of the Jobs running on this server"),
    857                     "NoSuchJob", pid);
     857                    "NoSuchJob", pid,out);
    858858  }else{
    859859    map* statusInfo=createMap("JobID",pid);
     
    861861      if(strncasecmp(req,"GetResult",strlen(req))==0){
    862862        errorException (conf, _("The result for the requested JobID has not yet been generated. "),
    863                         "ResultNotReady", pid);
     863                        "ResultNotReady", pid,out);
    864864        return;
    865865      }
     
    885885        if(result!=NULL){
    886886          char *encoding=getEncoding(conf);
    887           fprintf(stdout,"Content-Type: text/xml; charset=%s\r\nStatus: 200 OK\r\n\r\n",encoding);
    888           fprintf(stdout,"%s",result);
    889           fflush(stdout);
     887      FCGX_FPrintF(out,"Content-Type: text/xml; charset=%s\r\nStatus: 200 OK\r\n\r\n",encoding);
     888      FCGX_FPrintF(out,"%s",result);
     889      FCGX_FFlush(out);
    890890          freeMap(&statusInfo);
    891891          free(statusInfo);
     
    893893        }else{
    894894          errorException (conf, _("The result for the requested JobID has not yet been generated. "),
    895                           "ResultNotReady", pid);
     895                          "ResultNotReady", pid,out);
    896896          freeMap(&statusInfo);
    897897          free(statusInfo);
     
    914914        }
    915915    }
    916     printStatusInfo(conf,statusInfo,req);
     916    printStatusInfo(conf,statusInfo,req,out);
    917917    freeMap(&statusInfo);
    918918    free(statusInfo);
     
    927927 * @param pid the service identifier (usid key from the [lenv] section)
    928928 */
    929 void runDismiss(maps* conf,char* pid){
     929void runDismiss(maps* conf,char* pid,FCGX_Stream* out){
    930930  map* r_inputs = getMapFromMaps (conf, "main", "tmpPath");
    931931  char *sid=getStatusId(conf,pid);
    932932  if(sid==NULL){
    933933    errorException (conf, _("The JobID from the request does not match any of the Jobs running on this server"),
    934                     "NoSuchJob", pid);
     934                    "NoSuchJob", pid,out);
    935935  }else{
    936936    // We should send the Dismiss request to the target host if it differs
     
    967967          if(unlink(fileName)!=0){
    968968            errorException (conf, _("The job cannot be removed, a file cannot be removed"),
    969                             "NoApplicableCode", NULL);
     969                            "NoApplicableCode", NULL,out);
    970970            return;
    971971          }
     
    978978    map* statusInfo=createMap("JobID",pid);
    979979    addToMap(statusInfo,"Status","Dismissed");
    980     printStatusInfo(conf,statusInfo,"Dismiss");
     980    printStatusInfo(conf,statusInfo,"Dismiss",out);
    981981    free(statusInfo);
    982982  }
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