- Timestamp:
- Aug 7, 2017, 2:56:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/request_parser.c
r802 r839 533 533 xmlChar *val = xmlGetProp (cur, BAD_CAST "id"); 534 534 tmpmaps = createMaps((char *) val); 535 xmlFree(val); 535 536 } 536 537 … … 624 625 tmpmaps->content = 625 626 createMap (refs[l], (char *) val); 626 627 627 map *ltmp = getMap (tmpmaps->content, "method"); 628 628 if (l == 4 ) … … 750 750 map *btmp = 751 751 getMap (tmpmaps->content, "Reference"); 752 addToMap (tmpmaps->content, "Body", tmp); 752 753 if (btmp != NULL) 753 754 { … … 815 816 &bRead); 816 817 tmp[bInternet.ihandle[0].nDataLen] = 0; 817 InternetCloseHandle (&bInternet); 818 InternetCloseHandle(&bInternet); 819 addToMap (tmpmaps->content, "Body", tmp); 818 820 map *btmp = 819 821 getMap (tmpmaps->content, "href"); … … 832 834 } 833 835 free (tmp); 836 xmlFree (val); 834 837 } 835 838 } … … 1120 1123 const char ress[4][13] = 1121 1124 { "mimeType", "encoding", "schema", "transmission" }; 1125 xmlFree (val); 1122 1126 for (l = 0; l < 4; l++){ 1123 1127 val = xmlGetProp (cur, BAD_CAST ress[l]); … … 1139 1143 while (ccur != NULL){ 1140 1144 if(ccur->type == XML_ELEMENT_NODE){ 1141 char *xpathExpr=(char*)malloc(6 5+strlen(tmpmaps->name));1142 sprintf(xpathExpr,"/*/*[local-name()='Output' and @id='%s']/*[local-name()='Output']",tmpmaps->name); 1145 char *xpathExpr=(char*)malloc(66+strlen(tmpmaps->name)); 1146 sprintf(xpathExpr,"/*/*[local-name()='Output' and @id='%s']/*[local-name()='Output']",tmpmaps->name); 1143 1147 xmlXPathObjectPtr tmpsptr = extractFromDoc (doc, xpathExpr); 1144 1148 xmlNodeSet* cnodes = tmpsptr->nodesetval; 1145 1149 xmlParseOutputs2(main_conf,request_inputs,&tmpmaps->child,doc,cnodes); 1150 xmlXPathFreeObject (tmpsptr); 1151 free(xpathExpr); 1146 1152 break; 1147 1153 } … … 1424 1430 else 1425 1431 addToMap(*request_inputs,"mode","auto"); 1432 xmlFree(val); 1426 1433 val = xmlGetProp (cur, BAD_CAST "response"); 1427 1434 if(val!=NULL){ … … 1436 1443 addToMap(*request_inputs,"ResponseDocument",""); 1437 1444 } 1445 xmlFree(val); 1438 1446 } 1439 1447 }
Note: See TracChangeset
for help on using the changeset viewer.