Changeset 943 for trunk/zoo-project
- Timestamp:
- Jun 27, 2019, 12:57:25 PM (5 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/response_print.c
r929 r943 1001 1001 */ 1002 1002 void printDescribeProcessForProcess(registry *reg, maps* m,xmlDocPtr doc,xmlNodePtr nc,service* serv){ 1003 xmlNsPtr ns,ns_ows,ns_xlink; 1003 xmlNsPtr ns,ns_ows,ns_xlink; 1004 1004 xmlNodePtr n,nc1; 1005 1005 xmlNodePtr nc2 = NULL; -
trunk/zoo-project/zoo-kernel/service.c
r917 r943 1809 1809 // zooLogMsg(NULL, getLastErrorMessage()); 1810 1810 // zooLogMsg("log.txt", getLastErrorMessage()); 1811 1812 #ifdef WIN32 1813 #ifndef USE_MS 1814 char *strcasestr (char const *a, char const *b) 1815 { 1816 char *x = zStrdup (a); 1817 char *y = zStrdup (b); 1818 1819 x = _strlwr (x); 1820 y = _strlwr (y); 1821 char *pos = strstr (x, y); 1822 char *ret = pos == NULL ? NULL : (char *) (a + (pos - x)); 1823 free (x); 1824 free (y); 1825 return ret; 1826 }; 1827 #else 1828 ; 1829 #endif 1830 #endif -
trunk/zoo-project/zoo-kernel/service_internal_python.c
r939 r943 236 236 SetEnvironmentVariable("PYTHONHOME", home->value); 237 237 } 238 char buffer[128]; 238 char buffer[128]; 239 239 #endif 240 240 if(hasToClean>0) … … 254 254 #else 255 255 init_zoo(); 256 #endif 256 #endif 257 257 mainstate = PyThreadState_Swap(NULL); 258 258 PyEval_ReleaseLock(); … … 285 285 errorException (m, "Unable to parse serviceProvider please check your zcfg file.", "NoApplicableCode", NULL); 286 286 exit(-1); 287 } 288 pModule = PyImport_Import(pName); 287 } 288 289 pModule = PyImport_Import(pName); 289 290 int res=SERVICE_FAILED; 290 291 if (pModule != NULL) { … … 301 302 PyTuple_SetItem(pArgs, 1, (PyObject *)arg2); 302 303 PyTuple_SetItem(pArgs, 2, (PyObject *)arg3); 303 pValue = PyObject_CallObject(pFunc, pArgs); 304 pValue = PyObject_CallObject(pFunc, pArgs); 304 305 if (pValue != NULL) { 305 306 res=PyInt_AsLong(pValue); … … 335 336 #endif 336 337 PyThreadState_Swap(mainstate); 337 Py_Finalize(); 338 Py_Finalize(); 338 339 return res; 339 340 } -
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r931 r943 509 509 #ifdef WIN32 510 510 HINSTANCE so = 511 LoadLibraryEx (tmps1, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); 511 LoadLibraryEx (tmps1, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); 512 512 #else 513 513 void *so = dlopen (tmps1, RTLD_LAZY); … … 974 974 runRequest (map ** inputs) 975 975 { 976 976 977 977 #ifndef USE_GDB 978 978 #ifndef WIN32 … … 1282 1282 1283 1283 1284 1285 1284 service *s1; 1286 1285 int scount = 0; … … 1327 1326 #endif 1328 1327 } 1329 1328 1330 1329 if (strncasecmp (REQUEST, "GetCapabilities", 15) == 0) 1331 { 1330 { 1332 1331 #ifdef DEBUG 1333 1332 dumpMap (r_inputs); … … 1397 1396 } 1398 1397 else 1399 { 1398 { 1400 1399 r_inputs = getMap (request_inputs, "JobId"); 1401 1400 if(reqId>nbReqIdentifier){ … … 1533 1532 s1 = createService(); 1534 1533 t = readServiceFile (m, import->value, &s1, import->name); 1535 1534 1536 1535 if (t < 0) // failure reading zcfg 1537 1536 { … … 1589 1588 /** 1590 1589 * No support for dot in service name stored in metadb!? 1591 #ifdef META_DB1590 // #ifdef META_DB 1592 1591 service* s2=extractServiceFromDb(m,tmpMapI->value,0); 1593 1592 if(s2==NULL){ 1594 #endif1593 // #endif 1595 1594 */ 1596 1595 s1 = createService(); … … 1811 1810 } 1812 1811 else if (strncasecmp (REQUEST, "Execute", strlen (REQUEST)) != 0) 1813 { 1812 { 1814 1813 map* version=getMapFromMaps(m,"main","rversion"); 1815 1814 int vid=getVersionId(version->value); … … 1868 1867 } 1869 1868 } 1870 1869 1871 1870 map *postRequest = NULL; 1872 1871 postRequest = getMap (request_inputs, "xrequest"); … … 1951 1950 "InternalError", NULL); 1952 1951 } 1953 1952 1954 1953 int saved_stdout = zDup (fileno (stdout)); 1955 1954 zDup2 (fileno (stderr), fileno (stdout)); … … 2084 2083 dumpMap (request_inputs); 2085 2084 #endif 2086 2085 2087 2086 map *status = getMap (request_inputs, "status"); 2088 2087 if(vid==0){ … … 2165 2164 int eres = SERVICE_STARTED; 2166 2165 int cpid = zGetpid (); 2167 2166 2168 2167 // Create a map containing a copy of the request map 2169 2168 maps *_tmpMaps = createMaps("request"); … … 2219 2218 else 2220 2219 addToMap (_tmpMaps->content, "soap", "false"); 2221 2220 2222 2221 // Parse the session file and add it to the main maps 2223 2222 char* originalCookie=NULL; … … 2270 2269 #endif 2271 2270 int ei = 1; 2272 2271 2272 _tmpMaps = createMaps("renv"); 2273 2273 2274 #ifdef WIN32 2274 2275 LPVOID orig = GetEnvironmentStrings(); 2275 2276 LPTSTR s = (LPTSTR) orig; 2277 2278 while (*s != NULL) { 2279 char* env = strdup(s); 2280 char* delim = strchr(env,'='); 2281 if (delim != NULL) { 2282 char* val = delim+1; 2283 *delim = '\0'; 2284 if(_tmpMaps->content == NULL) { 2285 _tmpMaps->content = createMap(env,val); 2286 } 2287 else { 2288 addToMap(_tmpMaps->content,env,val); 2289 } 2290 } 2291 s += strlen(s)+1; 2292 } 2293 FreeEnvironmentStrings((LPCH)orig); 2276 2294 #else 2277 2295 char **orig = environ; 2278 2296 char *s=*orig; 2279 #endif 2280 2281 _tmpMaps = createMaps("renv"); 2282 if(orig!=NULL) 2283 for (; 2284 #ifdef WIN32 2285 *s; 2286 s++ 2287 #else 2297 2298 if(orig!=NULL) 2299 for (; 2288 2300 s; 2289 2301 ei++ 2290 #endif2291 2302 ) { 2292 2303 if(strstr(s,"=")!=NULL && strlen(strstr(s,"="))>1){ … … 2303 2314 free(tmpName); 2304 2315 } 2305 #ifndef WIN322306 2316 s = *(orig+ei); 2307 #endif 2308 } 2317 } 2318 #endif 2319 2309 2320 if(_tmpMaps->content!=NULL && getMap(_tmpMaps->content,"HTTP_COOKIE")!=NULL){ 2310 2321 addToMap(_tmpMaps->content,"HTTP_COOKIE1",&cgiCookie[0]); … … 2313 2324 freeMaps (&_tmpMaps); 2314 2325 free (_tmpMaps); 2315 #ifdef WIN32 2316 FreeEnvironmentStrings((LPCH)orig); 2317 #endif 2326 2318 2327 if(postRequest!=NULL) 2319 2328 setMapInMaps (m, "renv", "xrequest", postRequest->value); … … 2351 2360 if (status == NULLMAP) 2352 2361 { 2362 2353 2363 if(validateRequest(&m,s1,request_inputs, &request_input_real_format,&request_output_real_format,&hInternet)<0){ 2354 2364 freeService (&s1);
Note: See TracChangeset
for help on using the changeset viewer.