Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-kernel/service_internal_js.c

    r26 r9  
    2323 */
    2424
    25 #include "service_internal.h"
     25#include "service_internal_js.h"
    2626
    2727static char dbg[1024];
     
    7474  if (!JS_DefineFunction(cx, global, "ZOORequest", JSRequest, 4, 0))
    7575    return 1;
    76   if (!JS_DefineFunction(cx, global, "ZOOUpdateStatus", JSUpdateStatus, 2, 0))
    77     return 1;
    7876
    7977  /* Your application code here. This may include JSAPI calls
     
    8482  map* tmpm1=getMap(request,"metapath");
    8583  map* tmpm2=getMap(s->content,"serviceProvider");
     84  char filename[strlen(tmpm1->value)+strlen(tmpm2->value)+6];
    8685  char ntmp[1024];
    8786  getcwd(ntmp,1024);
    88   char filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+2];
    8987  sprintf(filename,"%s/%s%s",ntmp,tmpm1->value,tmpm2->value);
    90   filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+1]=0;
    91   fprintf(stderr,"FILENAME %s\n",filename);
    9288  struct stat file_status;
    9389  stat(filename, &file_status);
     
    207203
    208204  /* Cleanup. */
     205  // The JS_MaybeGC call imply segmentation fault
     206  //JS_MaybeGC(cx);
    209207  JS_DestroyScript(cx, script);
    210   JS_MaybeGC(cx);
    211208  // If we use the DestroyContext as requested to release memory then we get
    212209  // issue getting back the main configuration maps after coming back to the
     
    390387#endif
    391388      if(res!=NULL){
    392 #ifdef JS_DEBUG
    393389        fprintf(stderr,"%s - %s\n",JS_GetStringBytes(jsmsg),JS_GetStringBytes(jsmsg1));
    394 #endif
    395390        addToMap(res,JS_GetStringBytes(jsmsg),JS_GetStringBytes(jsmsg1));
    396391      }
     
    399394        res->next=NULL;
    400395      }
    401 #ifdef JS_DEBUG
    402396      dumpMap(res);
    403 #endif
    404397    }
    405398  }
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png