Skip to content

Commit

Permalink
Merge pull request #64 from superptitsam/load_lib_error
Browse files Browse the repository at this point in the history
Load lib error.

Thanks again for your contribution @superptitsam!

I just made small modifications before merging.
  • Loading branch information
gfenoy committed Aug 31, 2023
2 parents d2b4ff3 + afb093c commit ba0e4b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions zoo-project/zoo-kernel/caching.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ void cacheFile(maps* conf,char* request,char* mimeType,int length,char* filename
fo=fopen(fname,"w+");
if(fo==NULL){
#ifdef DEBUG
fprintf (stderr, "Failed to open %s for writing: %s\n",fname, strerror(errno));
fprintf (stderr, "Failed to open %s for writing\n",fname);
#endif
unlockFile(conf,lck);
return;
}
if(fi==NULL){
#ifdef DEBUG
fprintf (stderr, "Failed to open %s for reading: %s\n",filename, strerror(errno));
fprintf (stderr, "Failed to open %s for reading\n",filename);
#endif
unlockFile(conf,lck);
return;
Expand Down Expand Up @@ -308,7 +308,7 @@ void addToCache(maps* conf,char* request,char* content,char* mimeType,int length
FILE* fo=fopen(fname,"w+");
if(fo==NULL){
#ifdef DEBUG
fprintf (stderr, "Failed to open %s for writing: %s\n",fname, strerror(errno));
fprintf (stderr, "Failed to open %s for writing\n");
#endif
filepath = NULL;
unlockFile(conf,lck);
Expand Down
2 changes: 1 addition & 1 deletion zoo-project/zoo-kernel/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ elements* dupElements(elements* peElem){
if(peCursor!=NULL && peCursor->name!=NULL){
#ifdef DEBUG
fprintf(stderr,">> %s %i\n",__FILE__,__LINE__);
dumpElements(e);
dumpMap(peCursor->content);
fprintf(stderr,">> %s %i\n",__FILE__,__LINE__);
#endif
peTmp=(elements*)malloc(ELEMENTS_SIZE);
Expand Down
3 changes: 2 additions & 1 deletion zoo-project/zoo-kernel/zoo_service_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1670,12 +1670,13 @@ loadServiceAndRun (maps ** myMap, service * s1, map * request_inputs,
*/
char *serviceNamespacePath=NULL;
if(request_output_real_format!=NULL){
serviceNamespacePath=(char*)malloc(1024*sizeof(char));

//memset(serviceNamespacePath,'\0',1024);
map* zooServicesNamespaceMap= getMapFromMaps(m, "zooServicesNamespace", "namespace");
map* zooServicesNamespacePathMap=getMapFromMaps(m,"servicesNamespace","path");

if( zooServicesNamespaceMap && strlen(zooServicesNamespaceMap->value)>0 && zooServicesNamespacePathMap && strlen(zooServicesNamespacePathMap->value)>0){
serviceNamespacePath=(char*)malloc(1024*sizeof(char));
sprintf(serviceNamespacePath,"%s/%s",zooServicesNamespacePathMap->value,zooServicesNamespaceMap->value);
setMapInMaps(m, "lenv","cwd", serviceNamespacePath);
}
Expand Down

0 comments on commit ba0e4b9

Please sign in to comment.