Ignore:
Timestamp:
Sep 27, 2010, 10:09:32 PM (14 years ago)
Author:
djay
Message:

Add missing updated code from 26 ...

File:
1 edited

Legend:

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

    r26 r32  
    8080  }
    8181  conf=mapsFromJSObject(cx,argv[0]);
    82   dumpMaps(conf);
    8382  if(JS_ValueToInt32(cx,argv[1],&istatus)==JS_TRUE){
    8483    char tmpStatus[4];
     
    350349  else{
    351350    fprintf(stderr,"TMP4 NOT FOUND !!");
    352     //dumpMaps(tmp4);
    353351    return NULL;
    354352  }
     
    439437  else{
    440438    fprintf(stderr,"TMP4 NOT FOUND !!");
    441     //dumpMaps(tmp4);
    442439  }
    443440  xmlAddChild(nc4,nc5);
     
    964961  maps* tmp_maps=getMaps(m,"main");
    965962  if(tmp_maps!=NULL){
    966     dumpMaps(getMaps(m,"lenv"));
    967963    map* tmpm1=getMap(tmp_maps->content,"serverAddress");
    968964    /**
     
    12851281    while(tmp!=NULL){
    12861282      if(strncasecmp(tmp->name,"value",strlen(tmp->name))!=0 &&
     1283         strncasecmp(tmp->name,"extension",strlen(tmp->name))!=0 &&
     1284         strncasecmp(tmp->name,"asReference",strlen(tmp->name))!=0 &&
     1285         strncasecmp(tmp->name,"status",strlen(tmp->name))!=0 &&
     1286         strncasecmp(tmp->name,"storeExecuteResponse",strlen(tmp->name))!=0 &&
    12871287         strncasecmp(tmp->name,"extension",strlen(tmp->name))!=0)
    12881288        xmlNewProp(nc3,BAD_CAST tmp->name,BAD_CAST tmp->value);
     
    13061306    }
    13071307    else if(tmp!=NULL){
    1308       if(strcmp(tmp->value,"text/js")==0)
     1308      if(strncmp(tmp->value,"text/js",4)==0 ||
     1309         strncmp(tmp->value,"application/js",14)==0)
    13091310        xmlAddChild(nc3,xmlNewCDataBlock(doc,BAD_CAST toto->value,strlen(toto->value)));
    13101311      else
     
    13941395  maps* tmpMap=getMaps(m,"main");
    13951396  char *encoding=getEncoding(tmpMap);
    1396   map *tmpSid=getMapFromMaps(m,"lenv","sid");
    1397   if(tmpSid==NULL)
     1397  if(m!=NULL){
     1398    map *tmpSid=getMapFromMaps(m,"lenv","sid");
     1399    if(tmpSid!=NULL){
     1400      if( getpid()==atoi(tmpSid->value) )
     1401        printf("Content-Type: text/xml; charset=%s\r\nStatus: 200 OK\r\n\r\n",encoding);
     1402    }
     1403    else
     1404      printf("Content-Type: text/xml; charset=%s\r\nStatus: 200 OK\r\n\r\n",encoding);
     1405  }else
    13981406    printf("Content-Type: text/xml; charset=%s\r\nStatus: 200 OK\r\n\r\n",encoding);
    13991407
     
    15341542       * We get the first output only !!
    15351543       */
     1544      toto=getMap(request_outputs->content,"value");
     1545      if(toto==NULL){
     1546        map * errormap = createMap("text","Unable to fetch any result");
     1547        addToMap(errormap,"code", "InternalError");
     1548        fprintf(stderr,"DISPLAY ERROR MESSAGE !!!\n");
     1549        printExceptionReportResponse(m,errormap);
     1550        freeMap(&errormap);
     1551        free(errormap);
     1552      }
    15361553      char mime[1024];
    15371554      map* mi=getMap(request_outputs->content,"mimeType");
     
    15541571          sprintf(mime,"Content-Type: text/plain; charset=utf-8\r\nStatus: 200 OK\r\n\r\n");
    15551572      printf("%s",mime);
    1556       toto=getMap(request_outputs->content,"value");
    15571573      if(mi!=NULL && strncmp(mi->value,"image",5)==0){
    15581574        map* rs=getMapFromMaps(request_outputs,request_outputs->name,"size");
     
    15751591      errormap = createMap("text",tmp);     
    15761592      addToMap(errormap,"code", "InternalError");
    1577       printf("Content-Type: text/xml; charset=utf-8\r\nStatus: 200 OK\r\n\r\n");
     1593      fprintf(stderr,"DISPLAY ERROR MSG !!!!\n");
    15781594      printExceptionReportResponse(m,errormap);
    15791595      freeMap(&errormap);
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