Changeset 741 for branches/PublicaMundi_David_integration_01-devel/zoo-project/zoo-kernel/server_internal.c
- Timestamp:
- Oct 7, 2015, 8:41:43 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PublicaMundi_David_integration_01-devel/zoo-project/zoo-kernel/server_internal.c
r657 r741 850 850 * @param req the request (GetStatus / GetResult) 851 851 */ 852 void runGetStatus(maps* conf,char* pid,char* req ){852 void runGetStatus(maps* conf,char* pid,char* req,FCGX_Stream* out){ 853 853 map* r_inputs = getMapFromMaps (conf, "main", "tmpPath"); 854 854 char *sid=getStatusId(conf,pid); 855 855 if(sid==NULL){ 856 856 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); 858 858 }else{ 859 859 map* statusInfo=createMap("JobID",pid); … … 861 861 if(strncasecmp(req,"GetResult",strlen(req))==0){ 862 862 errorException (conf, _("The result for the requested JobID has not yet been generated. "), 863 "ResultNotReady", pid );863 "ResultNotReady", pid,out); 864 864 return; 865 865 } … … 885 885 if(result!=NULL){ 886 886 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); 890 890 freeMap(&statusInfo); 891 891 free(statusInfo); … … 893 893 }else{ 894 894 errorException (conf, _("The result for the requested JobID has not yet been generated. "), 895 "ResultNotReady", pid );895 "ResultNotReady", pid,out); 896 896 freeMap(&statusInfo); 897 897 free(statusInfo); … … 914 914 } 915 915 } 916 printStatusInfo(conf,statusInfo,req );916 printStatusInfo(conf,statusInfo,req,out); 917 917 freeMap(&statusInfo); 918 918 free(statusInfo); … … 927 927 * @param pid the service identifier (usid key from the [lenv] section) 928 928 */ 929 void runDismiss(maps* conf,char* pid ){929 void runDismiss(maps* conf,char* pid,FCGX_Stream* out){ 930 930 map* r_inputs = getMapFromMaps (conf, "main", "tmpPath"); 931 931 char *sid=getStatusId(conf,pid); 932 932 if(sid==NULL){ 933 933 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); 935 935 }else{ 936 936 // We should send the Dismiss request to the target host if it differs … … 967 967 if(unlink(fileName)!=0){ 968 968 errorException (conf, _("The job cannot be removed, a file cannot be removed"), 969 "NoApplicableCode", NULL );969 "NoApplicableCode", NULL,out); 970 970 return; 971 971 } … … 978 978 map* statusInfo=createMap("JobID",pid); 979 979 addToMap(statusInfo,"Status","Dismissed"); 980 printStatusInfo(conf,statusInfo,"Dismiss" );980 printStatusInfo(conf,statusInfo,"Dismiss",out); 981 981 free(statusInfo); 982 982 }
Note: See TracChangeset
for help on using the changeset viewer.