Changeset 871 for branches/prototype-v0
- Timestamp:
- Feb 27, 2018, 4:17:05 PM (7 years ago)
- Location:
- branches/prototype-v0/zoo-project/zoo-kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/request_parser.c
r867 r871 933 933 tmpmaps->content = 934 934 createMap (list[l], (char *) val); 935 xmlFree (val); 935 936 } 936 xmlFree (val); 937 else{ 938 if(l==0){ 939 if (tmpmaps->content != NULL) 940 addToMap (tmpmaps->content, list[l], 941 "string"); 942 else 943 tmpmaps->content = 944 createMap (list[l],"string"); 945 } 946 } 937 947 free (list[l]); 938 948 } … … 959 969 tmpmaps->content = 960 970 createMap (coms[l], (char *) val); 971 xmlFree (val); 961 972 } 962 xmlFree (val);963 973 } 964 974 } 965 975 966 976 map *test = getMap (tmpmaps->content, "encoding"); 967 977 968 978 if (test == NULL) 969 { 979 { 970 980 if (tmpmaps->content != NULL) 971 981 addToMap (tmpmaps->content, "encoding", … … 977 987 } 978 988 979 if ( strcasecmp (test->value, "base64") != 0)989 if (getMap(tmpmaps->content,"dataType")==NULL && test!=NULL && strcasecmp (test->value, "base64") != 0) 980 990 { 981 991 xmlChar *mv = xmlNodeListGetString (doc, … … 983 993 1); 984 994 map *ltmp = 985 getMap (tmpmaps->content, "mimeType"); 995 getMap (tmpmaps->content, "mimeType"); 986 996 if (mv == NULL 987 997 || … … 1068 1078 else 1069 1079 { 1070 xmlChar *tmp = xmlNodeListGetRawString (doc, 1071 cur4->xmlChildrenNode, 1072 0); 1073 addToMap (tmpmaps->content, "value", 1074 (char *) tmp); 1075 xmlFree (tmp); 1080 xmlNodePtr cur5 = cur4->children; 1081 while (cur5 != NULL 1082 && cur5->type != XML_CDATA_SECTION_NODE) 1083 cur5 = cur5->next; 1084 if (cur5 != NULL 1085 && cur5->type == XML_CDATA_SECTION_NODE) 1086 { 1087 addToMap (tmpmaps->content, 1088 "value", 1089 (char *) cur5->content); 1090 } 1091 else{ 1092 if(cur4->xmlChildrenNode!=NULL){ 1093 xmlChar *tmp = xmlNodeListGetRawString (doc, 1094 cur4->xmlChildrenNode, 1095 0); 1096 addToMap (tmpmaps->content, "value", 1097 (char *) tmp); 1098 xmlFree (tmp); 1099 } 1100 } 1076 1101 } 1077 1102 -
branches/prototype-v0/zoo-project/zoo-kernel/service.c
r860 r871 925 925 } 926 926 927 char *tmpV[1 2]={927 char *tmpV[14]={ 928 928 (char*)"size", 929 929 (char*)"value", … … 937 937 (char*)"schema", 938 938 (char*)"encoding", 939 (char*)"isCached" 939 (char*)"isCached", 940 (char*)"LowerCorner", 941 (char*)"UpperCorner" 940 942 }; 941 943 sprintf(tmpLen,"%d",len+1); 942 944 addToMap(_cursor->content,"length",tmpLen); 943 945 int i=0; 944 for(i=0;i<1 2;i++){946 for(i=0;i<14;i++){ 945 947 map* tmpVI=getMap(tmp->content,tmpV[i]); 946 948 if(tmpVI!=NULL){ -
branches/prototype-v0/zoo-project/zoo-kernel/ulinet.c
r864 r871 561 561 mc = curl_multi_perform(hInternet->handle, &still_running); 562 562 if(mc==CURLM_OK){ 563 #if LIBCURL_VERSION_MINOR >= 28 563 564 mc = curl_multi_wait(hInternet->handle, NULL, 0, 1000, &numfds); 565 #else 566 struct timeval timeout; 567 fd_set fdread; 568 fd_set fdwrite; 569 fd_set fdexcep; 570 int maxfd = -1; 571 572 long curl_timeo = -1; 573 574 FD_ZERO(&fdread); 575 FD_ZERO(&fdwrite); 576 FD_ZERO(&fdexcep); 577 578 /* set a suitable timeout to play around with */ 579 timeout.tv_sec = 1; 580 timeout.tv_usec = 0; 581 582 curl_multi_timeout(hInternet->handle, &curl_timeo); 583 if(curl_timeo >= 0) { 584 timeout.tv_sec = curl_timeo / 1000; 585 if(timeout.tv_sec > 1) 586 timeout.tv_sec = 1; 587 else 588 timeout.tv_usec = (curl_timeo % 1000) * 1000; 589 } 590 591 /* get file descriptors from the transfers */ 592 mc = curl_multi_fdset(hInternet->handle, &fdread, &fdwrite, &fdexcep, &maxfd); 593 #endif 564 594 } 565 595 if(mc != CURLM_OK) { -
branches/prototype-v0/zoo-project/zoo-kernel/ulinet.h
r863 r871 30 30 #include <fcntl.h> 31 31 #include <curl/curl.h> 32 #include <curl/curlver.h> 32 33 #include "service.h" 33 34 #ifndef WIN32
Note: See TracChangeset
for help on using the changeset viewer.