Changeset 820


Ignore:
Timestamp:
Apr 28, 2017, 6:00:52 PM (8 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).

Location:
trunk/zoo-project/zoo-kernel
Files:
3 edited

Legend:

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

    r797 r820  
    19821982    elements* ecurs=getElements(e,(e!=NULL?e->name:m->name));
    19831983    ecurs=ecurs->child;
    1984     while(curs!=NULL && ecurs!=NULL){
     1984    while(curs!=NULL){
     1985      ecurs=getElements(ecurs,(curs->name));
    19851986      map* inRequest=getMap(curs->content,"inRequest");
    19861987      if(inRequest!=NULL && strncasecmp(inRequest->value,"true",4)==0)
    19871988        printIOType(doc,nc1,ns_wps,ns_ows,ns_xlink,ecurs,curs,type,vid);
    19881989      curs=curs->next;
    1989       ecurs=ecurs->next;
     1990      ecurs=getElements(e,(e!=NULL?e->name:m->name));
     1991      ecurs=ecurs->child;
    19901992    }
    19911993  }
  • 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){
  • trunk/zoo-project/zoo-kernel/ulinet.c

    r817 r820  
    191191 * @param proto the protocol requiring the use of a proxy
    192192 */
    193 bool setProxiesForProtcol(CURL* handle,const char *proto){
     193int setProxiesForProtcol(CURL* handle,const char *proto){
    194194#ifdef MSG_LAF_VERBOSE
    195195  fprintf( stderr, "setProxiesForProtocol (do nothing) ...\n" );
    196196#endif
    197   return true;
     197  return 0;
    198198}
    199199#endif
     
    284284    char *token, *saveptr;
    285285    token = strtok_r (tmp, ",", &saveptr);
    286     for(int i=0;i<handle->nb;i++){
     286    int i;
     287    for(i=0;i<handle->nb;i++){
    287288      if(targetHosts->value[0]=='*' || isProtectedHost(targetHosts->value,handle->ihandle[i].url)==1){
    288289        while (token != NULL){
     
    290291          char* tmp1=(char*)malloc(length*sizeof(char));
    291292          snprintf(tmp1,6,"HTTP_");
    292           for(int i=0;token[i]!='\0';i++){
    293             if(token[i]!='-')
    294               tmp1[5+i]=toupper(token[i]);
     293          int j;
     294          for(j=0;token[j]!='\0';j++){
     295            if(token[j]!='-')
     296              tmp1[5+j]=toupper(token[i]);
    295297            else
    296               tmp1[5+i]='_';
    297             tmp1[5+i+1]='\0';
     298              tmp1[5+j]='_';
     299            tmp1[5+j+1]='\0';
    298300          }
    299301          fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,tmp1);
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