Changeset 441 for trunk/zoo-project/zoo-kernel
- Timestamp:
- Aug 20, 2013, 10:27:38 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r440 r441 1376 1376 #endif 1377 1377 xmlNodePtr cur3=cur2->children; 1378 hInternet.header=NULL; 1378 HINTERNET hInternetP; 1379 hInternetP=InternetOpen( 1380 #ifndef WIN32 1381 (LPCTSTR) 1382 #endif 1383 "ZooWPSClient\0", 1384 INTERNET_OPEN_TYPE_PRECONFIG, 1385 NULL,NULL, 0); 1386 hInternetP.header=NULL; 1379 1387 while(cur3){ 1380 1388 while(cur3!=NULL && cur3->type!=XML_ELEMENT_NODE) … … 1406 1414 } 1407 1415 } 1408 hInternet.header=curl_slist_append(hInternet.header, has); 1409 free(has); 1416 hInternetP.header=curl_slist_append(hInternetP.header, has); 1417 if(has!=NULL) 1418 free(has); 1410 1419 } 1411 1420 else{ … … 1441 1450 #ifdef POST_DEBUG 1442 1451 fprintf(stderr,"%s %s\n",btmp->value,tmp); 1443 curl_easy_setopt(hInternet .handle, CURLOPT_VERBOSE, 1);1444 #endif 1445 res=InternetOpenUrl(hInternet ,btmp->value,tmp,strlen(tmp),1452 curl_easy_setopt(hInternetP.handle, CURLOPT_VERBOSE, 1); 1453 #endif 1454 res=InternetOpenUrl(hInternetP,btmp->value,tmp,strlen(tmp), 1446 1455 INTERNET_FLAG_NO_CACHE_WRITE,0); 1447 1456 char* tmpContent = (char*)malloc((res.nDataLen+1)*sizeof(char)); … … 1453 1462 res.nDataLen, &dwRead); 1454 1463 tmpContent[res.nDataLen]=0; 1455 if(hInternet .header!=NULL)1456 curl_slist_free_all(hInternet .header);1464 if(hInternetP.header!=NULL) 1465 curl_slist_free_all(hInternetP.header); 1457 1466 addToMap(tmpmaps->content,"value",tmpContent); 1458 1467 #ifdef POST_DEBUG … … 1493 1502 #ifdef POST_DEBUG 1494 1503 fprintf(stderr,"%s %s\n",btmp->value,tmp); 1495 curl_easy_setopt(hInternet .handle, CURLOPT_VERBOSE, 1);1496 #endif 1497 res=InternetOpenUrl(hInternet ,btmp->value,tmp,1504 curl_easy_setopt(hInternetP.handle, CURLOPT_VERBOSE, 1); 1505 #endif 1506 res=InternetOpenUrl(hInternetP,btmp->value,tmp, 1498 1507 strlen(tmp), 1499 1508 INTERNET_FLAG_NO_CACHE_WRITE,0); … … 1506 1515 res.nDataLen, &dwRead); 1507 1516 tmpContent[res.nDataLen]=0; 1508 if(hInternet .header!=NULL)1509 curl_slist_free_all(hInternet .header);1517 if(hInternetP.header!=NULL) 1518 curl_slist_free_all(hInternetP.header); 1510 1519 addToMap(tmpmaps->content,"value",tmpContent); 1511 1520 #ifdef POST_DEBUG … … 1517 1526 cur3=cur3->next; 1518 1527 } 1528 InternetCloseHandle(hInternetP); 1519 1529 #ifdef POST_DEBUG 1520 1530 fprintf(stderr,"Header and Body was parsed from Reference \n");
Note: See TracChangeset
for help on using the changeset viewer.