Ignore:
Timestamp:
Sep 23, 2014, 4:03:07 PM (10 years ago)
Author:
djay
Message:

Fixes for metapath definition with prefixed names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/service_internal_python.c

    r490 r505  
    193193  PyObject *pName, *pModule, *pFunc;
    194194  tmp=getMap(s->content,"serviceProvider");
    195   if(tmp!=NULL)
    196     pName = PyString_FromString(tmp->value);
     195  map* mp=getMap(request,"metapath");
     196  if(tmp!=NULL){
     197    if(mp!=NULL && strlen(mp->value)>0){
     198      char *mps=zStrdup(mp->value);
     199      int i,len=strlen(mps);
     200      int j=0;
     201      for(i=0;i<len;i++){
     202        if(mps[i]=='/'){
     203          mps[i]='.';
     204        }
     205      }
     206      char *mn=(char*)malloc((strlen(mps)+strlen(tmp->value)+2)*sizeof(char));
     207      sprintf(mn,"%s.%s",mps,tmp->value);
     208      pName = PyString_FromString(mn);
     209      free(mn);
     210      free(mps);
     211    }
     212    else{
     213      pName = PyString_FromString(tmp->value);
     214      fprintf(stderr,"%s %d",tmp->value,__LINE__);
     215    }
     216  }
    197217  else{
    198218    map* err=createMap("text","Unable to parse serviceProvider please check your zcfg file.");
     
    457477#endif
    458478  }
     479  Py_DECREF(list);
    459480  return res;
    460481}
     
    507528    }
    508529  }
     530  Py_DECREF(list);
    509531  return res;
    510532}
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