Changeset 772 for trunk/zoo-project/zoo-kernel
- Timestamp:
- Jun 11, 2016, 11:48:27 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r767 r772 102 102 #include <time.h> 103 103 #include <stdarg.h> 104 105 #ifndef WIN32 106 extern char **environ; 107 #endif 104 108 105 109 #ifdef WIN32 … … 1974 1978 dumpMap (request_inputs); 1975 1979 #endif 1980 1981 int ei = 1; 1982 char *s = 1983 #ifdef WIN32 1984 GetEnvironmentStrings(); 1985 #else 1986 *environ; 1987 #endif 1988 _tmpMaps = (maps *) malloc (MAPS_SIZE); 1989 _tmpMaps->name = zStrdup ("renv"); 1990 _tmpMaps->content = NULL; 1991 _tmpMaps->next = NULL; 1992 for (; s; ei++) { 1993 char* tmpName=zStrdup(s); 1994 char* tmpValue=strstr(s,"=")+1; 1995 tmpName[strlen(tmpName)-strlen(tmpValue)-1]=0; 1996 if(_tmpMaps->content == NULL) 1997 _tmpMaps->content = createMap (tmpName,tmpValue); 1998 else 1999 addToMap (_tmpMaps->content,tmpName,tmpValue); 2000 free(tmpName); 2001 s = *(environ+ei); 2002 } 2003 addMapsToMaps (&m, _tmpMaps); 2004 freeMaps (&_tmpMaps); 2005 free (_tmpMaps); 2006 1976 2007 #ifdef WIN32 1977 2008 char *cgiSidL = NULL; … … 2091 2122 strlen (usid->value) + 7) * sizeof (char)); 2092 2123 sprintf (fbkpid, "%s/%s.pid", r_inputs->value, usid->value); 2124 setMapInMaps (m, "lenv", "file.pid", fbkpid); 2093 2125 2094 2126 f0 = freopen (fbkpid, "w+",stdout); … … 2102 2134 strlen (usid->value) + 7) * sizeof (char)); 2103 2135 sprintf (fbkp, "%s/%s.sid", r_inputs->value, usid->value); 2136 setMapInMaps (m, "lenv", "file.sid", fbkp); 2104 2137 FILE* f2 = freopen (fbkp, "w+",stdout); 2105 2138 printf("%s",tmpm->value); … … 2113 2146 sprintf (fbkp, "%s/%s_%s.xml", r_inputs->value, r_inputs1->value, 2114 2147 usid->value); 2148 setMapInMaps (m, "lenv", "file.responseInit", fbkp); 2115 2149 flog = 2116 2150 (char *) … … 2119 2153 sprintf (flog, "%s/%s_%s_error.log", r_inputs->value, 2120 2154 r_inputs1->value, usid->value); 2155 setMapInMaps (m, "lenv", "file.log", flog); 2121 2156 #ifdef DEBUG 2122 2157 fprintf (stderr, "RUN IN BACKGROUND MODE \n"); … … 2160 2195 sprintf (fbkp1, "%s/%s_final_%s.xml", r_inputs->value, 2161 2196 r_inputs1->value, usid->value); 2197 setMapInMaps (m, "lenv", "file.responseFinal", fbkp1); 2162 2198 2163 2199 f1 = freopen (fbkp1, "w+", stdout);
Note: See TracChangeset
for help on using the changeset viewer.