Changeset 282


Ignore:
Timestamp:
Jul 27, 2011, 3:26:01 AM (13 years ago)
Author:
djay
Message:

Fixe previous commit...

Location:
trunk/zoo-kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-kernel/service.h

    r281 r282  
    498498  }
    499499
    500   static map* getMapOrEmpty(map* m,const char *key){
     500  static map* getMapOrFill(map* m,const char *key,char* value){
    501501    map* tmp=m;
    502502    map* tmpMap=getMap(tmp,key);
    503503    if(tmpMap==NULL){
    504       addToMap(tmp,key,"");
     504      addToMap(tmp,key,value);
    505505      tmpMap=getMap(tmp,key);
    506506    }
  • trunk/zoo-kernel/service_internal.c

    r281 r282  
    23842384  int fsize;
    23852385  if(cached!=NULL){
    2386     fprintf(stderr,"Use cached file: %s\n",cached);
    23872386    struct stat f_status;
    23882387    int s=stat(cached, &f_status);
    23892388    if(s==0){
    2390       fprintf(stderr,"Use cached file: %s\n",cached);
    23912389      fcontent=(char*)malloc(sizeof(char)*(f_status.st_size+1));
    23922390      FILE* f=fopen(cached,"r");
     
    24052403    fsize=res.nDataLen;
    24062404  }
    2407   map* tmpMap=getMapOrEmpty(content,"value");
     2405  map* tmpMap=getMapOrFill(content,"value","");
    24082406  free(tmpMap->value);
    24092407  tmpMap->value=(char*)malloc((fsize+1)*sizeof(char));
  • trunk/zoo-kernel/zoo_service_loader.c

    r281 r282  
    452452  _getcwd(ntmp,1024);
    453453#endif
    454   r_inputs=getMap(request_inputs,"metapath");
    455   if(r_inputs==NULL){
    456     if(request_inputs==NULL)
    457       request_inputs=createMap("metapath","");
    458     else
    459       addToMap(request_inputs,"metapath","");
    460 #ifdef DEBUG
    461     fprintf(stderr,"ADD METAPATH\n");
    462     dumpMap(request_inputs);
    463 #endif
    464     r_inputs=getMap(request_inputs,"metapath");
    465   }
     454  r_inputs=getMapOrFill(request_inputs,"metapath","");
     455
    466456  char conf_file[10240];
    467457  snprintf(conf_file,10240,"%s/%s/main.cfg",ntmp,r_inputs->value);
     
    13991389                 * mimeType, encoding, schema
    14001390                 */
    1401                 const char *coms[3];
    1402                 coms[0]="mimeType";
    1403                 coms[1]="encoding";
    1404                 coms[2]="schema";
     1391                const char *coms[3]={"mimeType","encoding","schema"};
    14051392                for(int l=0;l<3;l++){
    14061393#ifdef DEBUG
     
    14331420                xmlChar* mv=xmlNodeListGetString(doc,cur4->xmlChildrenNode,1);
    14341421                map* ltmp=getMap(tmpmaps->content,"mimeType");
     1422                dumpMap(ltmp);
    14351423                if(mv==NULL ||
    14361424                   (xmlStrcasecmp(cur4->name, BAD_CAST "ComplexData")==0 &&
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