Changeset 841 for trunk/zoo-project


Ignore:
Timestamp:
Aug 7, 2017, 6:32:01 PM (2 years ago)
Author:
jmckenna
Message:

handle variable declarations on Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/ulinet.c

    r834 r841  
    8383    int i;
    8484    char* tmp;
     85    int cnt;
     86    _HINTERNET *psInternet;
    8587    for(i=0;i<12;i++)
    8688#ifndef WIN32
     
    9092#endif
    9193    tmp=strtok(buffer,";");
    92     int cnt=0;
    93     _HINTERNET *psInternet=(_HINTERNET *)data;
     94    cnt=0;
     95    psInternet=(_HINTERNET *)data;
    9496    if(tmp!=NULL && psInternet!=NULL){
    9597      psInternet->cookie=(char*)malloc(sizeof(char)*(strlen(tmp)+1));
     
    244246int isProtectedHost(const char* protectedHosts,const char* url){
    245247  char *token, *saveptr;
     248  int cnt;
     249  char* host; 
    246250  token = strtok_r (url, "//", &saveptr);
    247   int cnt=0;
    248   char* host;
     251  cnt=0;
    249252  while(token!=NULL && cnt<=1){
    250253    fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,token);
     
    279282    char *tmp=zStrdup(passThrough->value);
    280283    char *token, *saveptr;
     284    int i;   
    281285    token = strtok_r (tmp, ",", &saveptr);
    282     int i;
    283286    for(i=0;i<handle->nb;i++){
    284287      if(targetHosts->value[0]=='*' || isProtectedHost(targetHosts->value,handle->ihandle[i].url)==1){
    285288        while (token != NULL){
     289          int j;
     290      map* tmpMap;       
    286291          int length=strlen(token)+6;
    287292          char* tmp1=(char*)malloc(length*sizeof(char));
    288293          snprintf(tmp1,6,"HTTP_");
    289           int j;
    290294          for(j=0;token[j]!='\0';j++){
    291295            if(token[j]!='-')
     
    296300          }
    297301          fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,tmp1);
    298           map* tmpMap = getMapFromMaps(conf,"renv",tmp1);
     302          tmpMap = getMapFromMaps(conf,"renv",tmp1);
    299303          if(tmpMap!=NULL)         
    300304            AddMissingHeaderEntry(&handle->ihandle[i],token,tmpMap->value);
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