Changeset 433 for trunk/zoo-project/zoo-kernel
- Timestamp:
- Jul 5, 2013, 9:40:07 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r418 r433 2120 2120 int hasValidCookie=-1; 2121 2121 char *tcook=strdup(cgiCookie); 2122 char *tmp=NULL; 2123 int hasVal=-1; 2124 map* testing=getMapFromMaps(m,"main","cookiePrefix"); 2125 if(testing==NULL){ 2126 tmp=strdup("ID="); 2127 }else{ 2128 tmp=(char*)malloc((strlen(testing->value)+2)*sizeof(char)); 2129 sprintf(tmp,"%s=",testing->value); 2130 hasVal=1; 2131 } 2122 2132 if(strstr(cgiCookie,";")!=NULL){ 2123 2133 char *token,*saveptr; 2124 2134 token=strtok_r(cgiCookie,";",&saveptr); 2125 2135 while(token!=NULL){ 2126 if(strcasestr(token, "ID=")!=NULL){2136 if(strcasestr(token,tmp)!=NULL){ 2127 2137 if(tcook!=NULL) 2128 2138 free(tcook); … … 2133 2143 } 2134 2144 }else{ 2135 if(strstr(cgiCookie,"=")!=NULL && strcasestr(cgiCookie, "ID=")!=NULL){2145 if(strstr(cgiCookie,"=")!=NULL && strcasestr(cgiCookie,tmp)!=NULL){ 2136 2146 tcook=strdup(cgiCookie); 2137 2147 hasValidCookie=1; 2148 } 2149 if(tmp!=NULL){ 2150 free(tmp); 2138 2151 } 2139 2152 } … … 2157 2170 addMapsToMaps(&m,tmpSess); 2158 2171 freeMaps(&tmpSess); 2159 }else{2160 errorException(m, _("Unable to read your session file."), "InternalError");2161 2172 free(tmpSess); 2162 freeService(&s1);2163 free(s1);2164 freeMaps(&m);2165 free(m);2166 freeMaps(&request_input_real_format);2167 free(request_input_real_format);2168 freeMaps(&request_output_real_format);2169 free(request_output_real_format);2170 free(REQUEST);2171 free(SERVICE_URL);2172 return 1;2173 2173 } 2174 free(tmpSess);2175 2174 } 2176 2175 }
Note: See TracChangeset
for help on using the changeset viewer.