Changeset 254
- Timestamp:
- Jun 30, 2011, 1:01:25 AM (13 years ago)
- Location:
- trunk/zoo-kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-kernel/service.h
r253 r254 124 124 map* tmp=t; 125 125 while(tmp!=NULL){ 126 fprintf(stderr,"%s = %s\n",tmp->name,tmp->value); 126 127 fprintf(file,"%s = %s\n",tmp->name,tmp->value); 127 128 tmp=tmp->next; … … 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 -
trunk/zoo-kernel/service_internal.c
r216 r254 1722 1722 else 1723 1723 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); 1724 dumpMapsToFile(tmpSess,session_file_path); 1727 1725 } 1728 1726 } -
trunk/zoo-kernel/zoo_service_loader.c
r253 r254 1821 1821 struct stat file_status; 1822 1822 int istat = stat(session_file_path, &file_status); 1823 if(istat==0 ){1823 if(istat==0 && file_status.st_size>0){ 1824 1824 conf_read(session_file_path,tmpSess); 1825 1825 dumpMaps(tmpSess);
Note: See TracChangeset
for help on using the changeset viewer.