Changeset 967 for trunk/zoo-project/zoo-kernel/server_internal.c
- Timestamp:
- Dec 18, 2020, 2:13:22 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/server_internal.c
r962 r967 377 377 sprintf(rsize,"%lld",f_status.st_size); 378 378 if(getMap(content,"storage")==NULL){ 379 map* memUse=getMapFromMaps(m,"main","memory"); 380 if(memUse==NULL || strncmp(memUse->value,"load",4)==0){ 381 map* tmpMap1=getMap(content,"value"); 382 if(tmpMap1==NULL){ 383 addToMap(content,"value",""); 384 tmpMap1=getMap(content,"value"); 385 } 386 free(tmpMap1->value); 387 tmpMap1->value=(char*) malloc((f_status.st_size+1)*sizeof(char)); 388 if(tmpMap1->value==NULL){ 389 setMapInMaps(m,"lenv","message","Unable to allocate the memory required to read the produced file."); 390 return; 391 } 392 fread(&tmpMap1->value,1,f_status.st_size,file); 393 tmpMap1->value[f_status.st_size]=0; 394 } 379 map* tmpMap1=getMap(content,"value"); 380 if(tmpMap1==NULL){ 381 addToMap(content,"value",""); 382 tmpMap1=getMap(content,"value"); 383 } 384 free(tmpMap1->value); 385 tmpMap1->value=(char*) malloc((f_status.st_size+1)*sizeof(char)); 386 if(tmpMap1->value==NULL){ 387 setMapInMaps(m,"lenv","message","Unable to allocate the memory required to read the produced file."); 388 return; 389 } 390 fread(tmpMap1->value,1,f_status.st_size,file); 391 tmpMap1->value[f_status.st_size]=0; 395 392 } 396 393 fclose(file); … … 994 991 void runGetStatus(maps* conf,char* pid,char* req){ 995 992 map* r_inputs = getMapFromMaps (conf, "main", "tmpPath"); 996 map* e_type = getMapFromMaps (conf, " lenv", "executionType");993 map* e_type = getMapFromMaps (conf, "main", "executionType"); 997 994 char *sid=getStatusId(conf,pid); 998 995 if(sid==NULL){ … … 1101 1098 void runDismiss(maps* conf,char* pid){ 1102 1099 map* r_inputs = getMapFromMaps (conf, "main", "tmpPath"); 1103 map* e_type = getMapFromMaps (conf, " lenv", "executionType");1100 map* e_type = getMapFromMaps (conf, "main", "executionType"); 1104 1101 char *sid=getStatusId(conf,pid); 1105 1102 if(sid==NULL){
Note: See TracChangeset
for help on using the changeset viewer.