Ignore:
Timestamp:
May 10, 2014, 4:23:03 PM (10 years ago)
Author:
djay
Message:

Remove leaks from DescribeProcess? and JavaScript? support. Fix wrong ulinet update on previous commit. Use the new updateStatus/setOutputValue functions as described in #88 from longProcess. Add default value for QREncode service in ZCFG. Fix name of profile service in the ZCFG file.

File:
1 edited

Legend:

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

    r470 r471  
    170170  ret.mimeType = NULL;
    171171
    172   ret.handle=curl_share_init();
    173 
    174   curl_share_setopt(ret.handle, CURLOPT_COOKIEFILE, "ALL");
     172  curl_global_init(CURL_GLOBAL_ALL|CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32);
     173  ret.handle=curl_easy_init();
     174
     175  curl_easy_setopt(ret.handle, CURLOPT_COOKIEFILE, "ALL");
    175176#ifndef TIGER
    176   curl_share_setopt(ret.handle, CURLOPT_COOKIELIST, "ALL");
    177 #endif
    178   curl_share_setopt(ret.handle, CURLOPT_USERAGENT, lpszAgent);
    179  
    180   curl_share_setopt(ret.handle,CURLOPT_FOLLOWLOCATION,1);
    181   curl_share_setopt(ret.handle,CURLOPT_MAXREDIRS,3);
     177  curl_easy_setopt(ret.handle, CURLOPT_COOKIELIST, "ALL");
     178#endif
     179  curl_easy_setopt(ret.handle, CURLOPT_USERAGENT, lpszAgent);
     180 
     181  curl_easy_setopt(ret.handle,CURLOPT_FOLLOWLOCATION,1);
     182  curl_easy_setopt(ret.handle,CURLOPT_MAXREDIRS,3);
    182183 
    183184  header.memory=NULL;
    184185  header.size = 0;
    185186
    186   curl_share_setopt(ret.handle, CURLOPT_HEADERFUNCTION, header_write_data);
    187   curl_share_setopt(ret.handle, CURLOPT_WRITEHEADER, (void *)&header);
    188 
    189 #ifdef MSG_LAF_VERBOSE
    190   curl_share_setopt(ret.handle, CURLOPT_VERBOSE, 1);
     187  curl_easy_setopt(ret.handle, CURLOPT_HEADERFUNCTION, header_write_data);
     188  curl_easy_setopt(ret.handle, CURLOPT_WRITEHEADER, (void *)&header);
     189
     190#ifdef MSG_LAF_VERBOSE
     191  curl_easy_setopt(ret.handle, CURLOPT_VERBOSE, 1);
    191192#endif
    192193
     
    206207  }
    207208  if(handle.handle)
    208     curl_share_cleanup(handle.handle);
     209    curl_easy_cleanup(handle.handle);
    209210  curl_global_cleanup();
    210211}
     
    222223    case INTERNET_FLAG_NO_CACHE_WRITE:   
    223224      hInternet.hasCacheFile=-1;
    224       curl_share_setopt(hInternet.handle, CURLOPT_WRITEFUNCTION, write_data_into);
    225       curl_share_setopt(hInternet.handle, CURLOPT_WRITEDATA, &hInternet);
     225      curl_easy_setopt(hInternet.handle, CURLOPT_WRITEFUNCTION, write_data_into);
     226      curl_easy_setopt(hInternet.handle, CURLOPT_WRITEDATA, &hInternet);
    226227      break;
    227228    default:
     
    236237   
    237238      hInternet.hasCacheFile=1;
    238       curl_share_setopt(hInternet.handle, CURLOPT_WRITEFUNCTION, NULL);
    239       curl_share_setopt(hInternet.handle, CURLOPT_WRITEDATA, hInternet.file);
     239      curl_easy_setopt(hInternet.handle, CURLOPT_WRITEFUNCTION, NULL);
     240      curl_easy_setopt(hInternet.handle, CURLOPT_WRITEDATA, hInternet.file);
    240241      hInternet.nDataLen=0;
    241242      break;
     
    250251#endif
    251252    //curl_easy_setopt(hInternet.handle,CURLOPT_COOKIE,lpszHeaders);
    252     curl_share_setopt(hInternet.handle,CURLOPT_POST,1);
     253    curl_easy_setopt(hInternet.handle,CURLOPT_POST,1);
    253254#ifdef ULINET_DEBUG
    254255    fprintf(stderr,"** (%s) %d **\n",lpszHeaders,dwHeadersLength);
    255     curl_share_setopt(hInternet.handle,CURLOPT_VERBOSE,1);
    256 #endif
    257     curl_share_setopt(hInternet.handle,CURLOPT_POSTFIELDS,lpszHeaders);
     256    curl_easy_setopt(hInternet.handle,CURLOPT_VERBOSE,1);
     257#endif
     258    curl_easy_setopt(hInternet.handle,CURLOPT_POSTFIELDS,lpszHeaders);
    258259    //curl_easy_setopt(hInternet.handle,CURLOPT_POSTFIELDSIZE,dwHeadersLength+1);
    259260    if(hInternet.header!=NULL)
    260       curl_share_setopt(hInternet.handle,CURLOPT_HTTPHEADER,hInternet.header);
    261   }
    262 
    263   curl_share_setopt(hInternet.handle,CURLOPT_URL,lpszUrl);
     261      curl_easy_setopt(hInternet.handle,CURLOPT_HTTPHEADER,hInternet.header);
     262  }
     263
     264  curl_easy_setopt(hInternet.handle,CURLOPT_URL,lpszUrl);
    264265  curl_easy_perform(hInternet.handle);
    265266  curl_easy_getinfo(hInternet.handle,CURLINFO_CONTENT_TYPE,&hInternet.mimeType);
     
    273274  memset(&CCookie[0],0,1024);
    274275#ifndef TIGER
    275   curl_share_setopt(hInternet.handle, CURLOPT_COOKIELIST, "ALL");
     276  curl_easy_setopt(hInternet.handle, CURLOPT_COOKIELIST, "ALL");
    276277#endif
    277278  return 1;
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