Changeset 841 for trunk/zoo-project/zoo-kernel
- Timestamp:
- Aug 7, 2017, 6:32:01 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/ulinet.c
r834 r841 83 83 int i; 84 84 char* tmp; 85 int cnt; 86 _HINTERNET *psInternet; 85 87 for(i=0;i<12;i++) 86 88 #ifndef WIN32 … … 90 92 #endif 91 93 tmp=strtok(buffer,";"); 92 intcnt=0;93 _HINTERNET *psInternet=(_HINTERNET *)data;94 cnt=0; 95 psInternet=(_HINTERNET *)data; 94 96 if(tmp!=NULL && psInternet!=NULL){ 95 97 psInternet->cookie=(char*)malloc(sizeof(char)*(strlen(tmp)+1)); … … 244 246 int isProtectedHost(const char* protectedHosts,const char* url){ 245 247 char *token, *saveptr; 248 int cnt; 249 char* host; 246 250 token = strtok_r (url, "//", &saveptr); 247 int cnt=0; 248 char* host; 251 cnt=0; 249 252 while(token!=NULL && cnt<=1){ 250 253 fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,token); … … 279 282 char *tmp=zStrdup(passThrough->value); 280 283 char *token, *saveptr; 284 int i; 281 285 token = strtok_r (tmp, ",", &saveptr); 282 int i;283 286 for(i=0;i<handle->nb;i++){ 284 287 if(targetHosts->value[0]=='*' || isProtectedHost(targetHosts->value,handle->ihandle[i].url)==1){ 285 288 while (token != NULL){ 289 int j; 290 map* tmpMap; 286 291 int length=strlen(token)+6; 287 292 char* tmp1=(char*)malloc(length*sizeof(char)); 288 293 snprintf(tmp1,6,"HTTP_"); 289 int j;290 294 for(j=0;token[j]!='\0';j++){ 291 295 if(token[j]!='-') … … 296 300 } 297 301 fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,tmp1); 298 map*tmpMap = getMapFromMaps(conf,"renv",tmp1);302 tmpMap = getMapFromMaps(conf,"renv",tmp1); 299 303 if(tmpMap!=NULL) 300 304 AddMissingHeaderEntry(&handle->ihandle[i],token,tmpMap->value);
Note: See TracChangeset
for help on using the changeset viewer.