Ignore:
Timestamp:
Apr 23, 2014, 3:05:01 AM (10 years ago)
Author:
djay
Message:

Add the optional YAML ZCFG support #4 and the zcfg2yaml converter. Return error messages that enable the service provider to quickly identify the root cause of errors due to configuration file syntax #90. Fix logic in addMapToMap #91. Enable multiple range definition using default and supported blocks. Add the lastest revision number in version.h (available from Python ZOO-API as zoo.VERSION).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/service_conf.y

    r453 r465  
    2424static bool wait_outputs=false;
    2525static bool wait_data=false;
    26 static int services_c=0;
    2726static service* my_service=NULL;
    28 static map* previous_content=NULL;
    2927static map* current_content=NULL;
    3028static elements* current_element=NULL;
    31 static map* scontent=NULL;
    3229static char* curr_key;
    3330static int debug=0;
     
    772769 * definition file.
    773770 */
    774 int getServiceFromFile(const char* file,service** service){
    775 
    776   freeMap(&previous_content);
    777   previous_content=NULL;
    778   freeMap(&current_content);
    779   current_content=NULL;
    780   freeMap(&scontent);
     771int getServiceFromFile(maps* conf,const char* file,service** service){
     772  if(current_content!=NULL){
     773    freeMap(&current_content);
     774    free(current_content);
     775    current_content=NULL;
     776  }
    781777#ifdef DEBUG_SERVICE_CONF
    782778  fprintf(stderr,"(STARTING)FREE current_element\n");
    783779#endif
    784   freeElements(&current_element);
    785   free(current_element);
    786   current_element=NULL;
     780  if(current_element!=NULL){
     781    freeElements(&current_element);
     782    free(current_element);
     783    current_element=NULL;
     784  }
    787785  my_service=NULL;
    788   scontent=NULL;
    789786
    790787  wait_maincontent=true;
     
    810807  int resultatYYParse = srparse() ;
    811808 
     809#ifdef DEBUG_SERVICE_CONF
     810  fprintf(stderr,"RESULT: %d %d\n",resultatYYParse,wait_outputs);
     811#endif
    812812  if(wait_outputs && current_element!=NULL && current_element->name!=NULL){
    813813    if(my_service->outputs==NULL){     
     
    848848  dumpService(my_service);
    849849#endif
    850   *service=my_service;
     850  if(wait_outputs<0 || my_service==NULL || my_service->name==NULL || my_service->content==NULL || my_service->inputs==NULL || my_service->outputs==NULL){
     851    setMapInMaps(conf,"lenv","message",srlval.chaine);
     852#ifndef WIN32
     853    srlex_destroy();
     854#endif
     855    return -1;
     856  }
     857  else
     858    *service=my_service;
    851859
    852860#ifndef WIN32
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