Ignore:
Timestamp:
Apr 28, 2017, 6:00:52 PM (4 years ago)
Author:
djay
Message:

Fix issue with nested inputs initialization. Fix issue when returning nested outputs. Fix issue with ulinet.c for building the ZOO-Kernel (thanks to Niroshan Sanjaya and Julien Abt for reporting the issue).

File:
1 edited

Legend:

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

    r805 r820  
    662662            if(tmpMaps2->content==NULL)
    663663              tmpMaps2->content=createMap(tmpm->name,tmpm->value);
    664             else
     664            else{
    665665              addToMap(tmpMaps2->content,tmpm->name,tmpm->value);
     666            }
    666667            tmpm=tmpm->next;
    667668          }
    668669        }
    669         addToMap(tmpMaps2->content,"inRequest","false");
     670        if(tmpMaps2->content==NULL){
     671          tmpMaps2->content=createMap("inRequest","false");
     672          dumpMaps(tmpMaps2);
     673        }
     674        else
     675          addToMap(tmpMaps2->content,"inRequest","false");
    670676        if(type==0){
    671677          map *tmpMap=getMap(tmpMaps2->content,"value");
     
    673679            addToMap(tmpMaps2->content,"value","NULL");
    674680        }
     681        elements* tmpElements=getElements(in,tmpMaps2->name);
     682        if(tmpElements!=NULL && tmpElements->child!=NULL){
     683          char *res=addDefaultValues(&tmpMaps2->child,tmpElements->child,m,type,err);
     684          if(strlen(res)>0){
     685            return res;
     686          }
     687        }
     688
    675689        if(out1==NULL){
    676690          *out=dupMaps(&tmpMaps2);
     
    687701      }
    688702    }
    689     else{
     703    else {
    690704      iotype* tmpIoType=NULL;
    691705      if(tmpMaps->content!=NULL){
     
    820834        addToMap(tmpMaps->content,"inRequest","true");
    821835      elements* tmpElements=getElements(in,tmpMaps->name);
    822       if(tmpMaps->child!=NULL && tmpElements!=NULL && tmpElements->child!=NULL){
     836      if(tmpElements!=NULL && tmpElements->child!=NULL){
    823837        char *res=addDefaultValues(&tmpMaps->child,tmpElements->child,m,type,err);
    824838        if(strlen(res)>0){
    825           fprintf(stderr,"%s %d\n",__FILE__,__LINE__);
    826839          return res;
    827840        }
    828841      }
    829842    }
    830     if(tmpInputs->child!=NULL){
    831       tmpInputss=tmpInputs->next;
    832       tmpInputs=tmpInputs->child;
    833       if(tmpMaps!=NULL){
    834         out1=tmpMaps->child;
    835         out1s=tmpMaps;
    836       }
    837     }else
    838       tmpInputs=tmpInputs->next;
     843    tmpInputs=tmpInputs->next;
    839844  }
    840845  if(tmpInputss!=NULL){
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