Ignore:
Timestamp:
Jan 8, 2011, 2:12:24 PM (13 years ago)
Author:
djay
Message:

Add support for multiple outputs format for DescribeProcess? and Execute requests. Note that currently if RawDataOutput? is asked, then only first output can be returned.

File:
1 edited

Legend:

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

    r60 r65  
    203203        dumpElements(my_service->inputs);
    204204        dumpService(my_service);
    205 #endif
     205#endif 
    206206        if(my_service->inputs==NULL){
    207207          my_service->inputs=dupElements(current_element);
     
    238238      wait_outputs=true;
    239239      current_data=2;
    240       previous_data=1;
     240      previous_data=2;
    241241    }
    242242    else
     
    587587    else
    588588      if(current_data==2){
    589         if(wait_inputs==true){
     589        wait_outputs=true;
     590        if(wait_inputs){
    590591          if(current_element!=NULL && current_element->name!=NULL){
    591             if(my_service->inputs==NULL){
    592               my_service->inputs=dupElements(current_element);
    593               my_service->inputs->next=NULL;
     592            if(my_service->outputs==NULL){
     593              my_service->outputs=dupElements(current_element);
     594              my_service->outputs->next=NULL;
    594595            }
    595596            else{
     
    597598              fprintf(stderr,"LAST NAME IN %s (current - %s)\n",$1,current_element->name);
    598599#endif
    599               addToElements(&my_service->inputs,current_element);
     600              addToElements(&my_service->outputs,current_element);
    600601            }
    601602#ifdef DEBUG_SERVICE_CONF
     
    624625#endif
    625626            char *cen=strdup($1);
    626             current_element->name=(char*)malloc((strlen(cen)-1)*sizeof(char*));
     627            current_element->name=(char*)malloc((strlen(cen)-1)*sizeof(char));
    627628            cen[strlen(cen)-1]=0;
    628629            cen+=1;
     
    637638            current_element->next=NULL;
    638639          }
    639           wait_inputs=false;
     640
    640641          current_content=NULL;
    641642        }
    642643        else
    643           if(current_element->name==NULL){
     644          if(current_element!=NULL && current_element->name!=NULL){
     645            if(my_service->outputs==NULL)
     646              my_service->outputs=dupElements(current_element);
     647            else
     648              addToElements(&my_service->outputs,current_element);
     649            fprintf(stderr,"ADD TO OUTPUTS Elements\n");
     650            dupElements(current_element);
     651
     652            freeElements(&current_element);
     653            free(current_element);
     654            current_element=NULL;
     655          }
     656          else{
    644657#ifdef DEBUG_SERVICE_CONF
    645658            fprintf(stderr,"NAME OUT %s\n",$1);
     
    663676            current_element->next=NULL;
    664677          }
     678        wait_inputs=false;
    665679        wait_outputs=true;
     680        //wait_outputs=true;
    666681      }
    667682  }
     
    724739  int resultatYYParse = srparse() ;
    725740 
    726   if(wait_outputs==true && current_element!=NULL && current_element->name!=NULL){
     741  if(wait_outputs && current_element!=NULL && current_element->name!=NULL){
    727742    if(my_service->outputs==NULL){     
    728743#ifdef DEBUG_SERVICE_CONF
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