Changeset 390 for trunk/zoo-project/zoo-kernel
- Timestamp:
- Jan 14, 2013, 10:43:37 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r388 r390 2105 2105 addToMap(_tmpMaps->content,"soap","false"); 2106 2106 if(cgiCookie!=NULL && strlen(cgiCookie)>0){ 2107 int hasValidCookie=-1; 2107 2108 char *tcook=strdup(cgiCookie); 2108 2109 if(strstr(cgiCookie,";")>0){ … … 2114 2115 free(tcook); 2115 2116 tcook=strdup(token); 2117 hasValidCookie=1; 2116 2118 } 2117 2119 token=strtok_r(NULL,";",&saveptr); 2118 2120 } 2119 2121 } 2120 addToMap(_tmpMaps->content,"sessid",strstr(tcook,"=")+1); 2121 char session_file_path[1024]; 2122 map *tmpPath=getMapFromMaps(m,"main","sessPath"); 2123 if(tmpPath==NULL) 2124 tmpPath=getMapFromMaps(m,"main","tmpPath"); 2125 char *tmp1=strtok(tcook,";"); 2126 if(tmp1!=NULL) 2127 sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(tmp1,"=")+1); 2128 else 2129 sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(cgiCookie,"=")+1); 2130 free(tcook); 2131 maps *tmpSess=(maps*)malloc(MAPS_SIZE); 2132 struct stat file_status; 2133 int istat = stat(session_file_path, &file_status); 2134 if(istat==0 && file_status.st_size>0){ 2135 conf_read(session_file_path,tmpSess); 2136 addMapsToMaps(&m,tmpSess); 2137 freeMaps(&tmpSess); 2138 }else{ 2139 errorException(m, _("Unable to read your session file."), "InternalError"); 2140 freeMaps(&tmpSess); 2141 freeService(&s1); 2142 free(s1); 2143 freeMaps(&m); 2144 free(m); 2145 freeMaps(&request_input_real_format); 2146 free(request_input_real_format); 2147 freeMaps(&request_output_real_format); 2148 free(request_output_real_format); 2149 free(REQUEST); 2150 free(SERVICE_URL); 2151 return 1; 2152 } 2153 free(tmpSess); 2122 if(hasValidCookie>0){ 2123 addToMap(_tmpMaps->content,"sessid",strstr(tcook,"=")+1); 2124 char session_file_path[1024]; 2125 map *tmpPath=getMapFromMaps(m,"main","sessPath"); 2126 if(tmpPath==NULL) 2127 tmpPath=getMapFromMaps(m,"main","tmpPath"); 2128 char *tmp1=strtok(tcook,";"); 2129 if(tmp1!=NULL) 2130 sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(tmp1,"=")+1); 2131 else 2132 sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(cgiCookie,"=")+1); 2133 free(tcook); 2134 maps *tmpSess=(maps*)malloc(MAPS_SIZE); 2135 struct stat file_status; 2136 int istat = stat(session_file_path, &file_status); 2137 if(istat==0 && file_status.st_size>0){ 2138 conf_read(session_file_path,tmpSess); 2139 addMapsToMaps(&m,tmpSess); 2140 freeMaps(&tmpSess); 2141 }else{ 2142 errorException(m, _("Unable to read your session file."), "InternalError"); 2143 free(tmpSess); 2144 freeService(&s1); 2145 free(s1); 2146 freeMaps(&m); 2147 free(m); 2148 freeMaps(&request_input_real_format); 2149 free(request_input_real_format); 2150 freeMaps(&request_output_real_format); 2151 free(request_output_real_format); 2152 free(REQUEST); 2153 free(SERVICE_URL); 2154 return 1; 2155 } 2156 free(tmpSess); 2157 } 2154 2158 } 2155 2159 addMapsToMaps(&m,_tmpMaps);
Note: See TracChangeset
for help on using the changeset viewer.