Changeset 268 for branches/branch-1.2/zoo-kernel
- Timestamp:
- Jul 16, 2011, 12:58:47 PM (13 years ago)
- Location:
- branches/branch-1.2
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1.2
-
branches/branch-1.2/zoo-kernel/main.cfg
r5 r268 6 6 tmpPath=/YourFullTmpPathHere/ 7 7 tmpUrl = ../TmpPathRelativeToServerAdress/ 8 dataPath = /YouFullDataPathHere/ 8 9 9 10 [identification] … … 20 21 positionName=Developer 21 22 role=Dev 22 ad ressDeliveryPoint=1280, avenue des Platanes23 addressDeliveryPoint=1280, avenue des Platanes 23 24 addressCity=Lattes 24 25 addressAdministrativeArea=False -
branches/branch-1.2/zoo-kernel/main_conf_read.y
r217 r268 47 47 /* le type des lval des jetons et des elements non terminaux bison */ 48 48 //====================================================== 49 %union 50 { 51 char * s; 52 } 53 %union { char* chaine; char* key;char* val;} 49 %union { char* s;char* chaine; char* key;char* val;} 54 50 //====================================================== 55 51 -
branches/branch-1.2/zoo-kernel/nmake.opt
r217 r268 9 9 CPP=cl /TP $(CFLAGS) 10 10 11 CFLAGS=-DUSE_PYTHON /EHa /nologo /MT /W3 /EHsc /O2 /D_CRT_SECURE_NO_WARNINGS /DWIN32 $(CJFLAGS) -I./ -I..\thirds\dirent-win32 -I $(PYTHON_CPATH)\include -I$(GEODIR)/include -ILIBINTL_CPATH\include -I$(TPATH)\include -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF11 CFLAGS=-DUSE_PYTHON /EHa /nologo /MT /W3 /EHsc /O2 /D_CRT_SECURE_NO_WARNINGS /DWIN32 $(CJFLAGS) -I./ -I..\thirds\dirent-win32 -I..\thirds\include -I$(PYTHON_CPATH)\include -I$(GEODIR)/include -ILIBINTL_CPATH\include -I$(TPATH)\include -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF 12 12 13 LDFLAGS=$(GEODIR)/lib/libfcgi.lib $(GEODIR)/lib/libcurl_im 14 p.lib $(GEODIR)/apps/Python25/libs/python25.lib $(GEODIR)/lib/libxml2.lib ../thirds/cgic206/libcgic.lib $(GEODIR)/lib/gdal_i.lib $(TOOLS)\..\lib\libeay32.dll.a $(TOOLS)\..\lib\libcrypto.a $(TOOLS)\..\lib\libssl32.dll.a $(TOOLS)\..\lib\libintl.lib /machine:i386 13 LDFLAGS=$(GEODIR)/lib/libfcgi.lib $(GEODIR)/lib/libcurl_imp.lib $(GEODIR)/apps/Python25/libs/python25.lib $(GEODIR)/lib/libxml2.lib ../thirds/cgic206/libcgic.lib $(GEODIR)/lib/gdal_i.lib $(TOOLS)\..\lib\libeay32.dll.a $(TOOLS)\..\lib\libcrypto.a $(TOOLS)\..\lib\libssl32.dll.a $(TOOLS)\..\lib\libintl.lib /machine:i386 -
branches/branch-1.2/zoo-kernel/service.h
r217 r268 124 124 map* tmp=t; 125 125 while(tmp!=NULL){ 126 fprintf(file,"%s = %s\n",t->name,t->value); 126 fprintf(stderr,"%s = %s\n",tmp->name,tmp->value); 127 fprintf(file,"%s = %s\n",tmp->name,tmp->value); 127 128 tmp=tmp->next; 128 129 } … … 138 139 } 139 140 140 static void dumpMapsToFile(maps* m,FILE* file){ 141 static void dumpMapsToFile(maps* m,char* file_path){ 142 FILE* file=fopen(file_path,"w"); 141 143 maps* tmp=m; 142 144 if(tmp!=NULL){ 143 145 fprintf(file,"[%s]\n",tmp->name); 144 146 dumpMapToFile(tmp->content,file); 145 } 147 fflush(file); 148 } 149 fclose(file); 146 150 } 147 151 … … 549 553 map* tmpV=getMap(res->content,"value"); 550 554 free(tmpV->value); 551 tmpV->value=(char*)malloc( atoi(tmp->value)*sizeof(char));555 tmpV->value=(char*)malloc((atoi(tmp->value)+1)*sizeof(char)); 552 556 memmove(tmpV->value,tmpSized,atoi(tmp->value)*sizeof(char)); 557 tmpV->value[atoi(tmp->value)]=0; 553 558 free(tmpSized); 554 559 } -
branches/branch-1.2/zoo-kernel/service_conf.l
r217 r268 41 41 42 42 attname [a-zA-Z0-9_\-]+ 43 attvalue1 [\^\*\+,;@a-zA-Z0-9_\-::.:" "\"\'/\\\(\)\t\| ]+43 attvalue1 [\^\*\+,;@a-zA-Z0-9_\-::.:" "\"\'/\\\(\)\t\|\$\&>]+ 44 44 45 45 attvalue \"[^"]*\"|\'[^']*\'\(\) -
branches/branch-1.2/zoo-kernel/service_conf.y
r217 r268 356 356 //====================================================== 357 357 EmptyElemTag 358 : INFCAR ID Attributeetoile SLASH SUPCAR {} 358 : INFCAR ID Attributeetoile SLASH SUPCAR { 359 if(strncasecmp($2,"Default",7)==0){ 360 wait_defaults=false; 361 current_data=previous_data; 362 if(current_element->defaults==NULL){ 363 current_element->defaults=(iotype*)malloc(IOTYPE_SIZE); 364 current_element->defaults->content=NULL; 365 } 366 addMapToMap(¤t_element->defaults->content,current_content); 367 freeMap(¤t_content); 368 free(current_content); 369 current_element->defaults->next=NULL; 370 wait_defaults=false; 371 current_content=NULL; 372 current_element->supported=NULL; 373 current_element->next=NULL; 374 } 375 } 359 376 ; 360 377 -
branches/branch-1.2/zoo-kernel/service_internal.c
r217 r268 173 173 } 174 174 #else 175 175 176 void unhandleStatus(maps *conf){ 176 177 int shmid,i; … … 209 210 if ((shmid = shmget(key, SHMSZ, IPC_CREAT | 0666)) < 0) { 210 211 #ifdef DEBUG 211 fprintf(stderr,"shmget failed to update value\n");212 fprintf(stderr,"shmget failed to create new Shared memory segment\n"); 212 213 #endif 213 214 }else{ … … 220 221 tmpMap=getMapFromMaps(conf,"lenv","status"); 221 222 s1=shm; 222 for(s=tmpMap->value; s!=NULL;s++)223 for(s=tmpMap->value;*s!=NULL && *s!=0;s++){ 223 224 *s1++=*s; 225 } 226 *s1=NULL; 224 227 shmdt((void *)shm); 225 228 } … … 1722 1725 else 1723 1726 sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(_tmp->value,"=")+1); 1724 FILE* file=fopen(session_file_path,"w"); 1725 dumpMapsToFile(tmpSess,file); 1726 fclose(file); 1727 dumpMapsToFile(tmpSess,session_file_path); 1727 1728 } 1728 1729 } -
branches/branch-1.2/zoo-kernel/service_internal.h
r217 r268 57 57 #include <openssl/bio.h> 58 58 #include <openssl/buffer.h> 59 60 #include "cgic.h" 59 61 60 62 extern int getServiceFromFile(const char*,service**); -
branches/branch-1.2/zoo-kernel/zoo_service_loader.c
r217 r268 675 675 #endif 676 676 while ((dp = readdir(dirp)) != NULL) 677 if(strcmp(dp->d_name,buff)==0){ 677 if((strcasecmp("all.zcfg",buff)==0 && strstr(dp->d_name,".zcfg")>0) 678 || strcasecmp(dp->d_name,buff)==0){ 678 679 memset(buff1,0,1024); 679 680 snprintf(buff1,1024,"%s/%s",conf_dir,dp->d_name); … … 764 765 return 0; 765 766 } 766 //close(saved_stdout);767 close(saved_stdout); 767 768 768 769 #ifdef DEBUG … … 1812 1813 if(tmpPath==NULL) 1813 1814 tmpPath=getMapFromMaps(m,"main","tmpPath"); 1814 sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(cgiCookie,"=")+1); 1815 char *tmp1=strtok(cgiCookie,";"); 1816 if(tmp1!=NULL) 1817 sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(tmp1,"=")+1); 1818 else 1819 sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(cgiCookie,"=")+1); 1820 1815 1821 maps *tmpSess=(maps*)calloc(1,MAPS_SIZE); 1816 1822 struct stat file_status; 1817 1823 int istat = stat(session_file_path, &file_status); 1818 if(istat==0 ){1824 if(istat==0 && file_status.st_size>0){ 1819 1825 conf_read(session_file_path,tmpSess); 1820 1826 dumpMaps(tmpSess);
Note: See TracChangeset
for help on using the changeset viewer.