Changeset 66 for trunk


Ignore:
Timestamp:
Jan 8, 2011, 4:02:56 PM (13 years ago)
Author:
djay
Message:

Fix for RawDataOutputs? in case of multiple outputs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-kernel/service_internal.c

    r65 r66  
    16061606    if(res!=SERVICE_FAILED){
    16071607      /**
    1608        * We get the first output only !!
     1608       * We get the requested output or fallback to the first one if the
     1609       * requested one is not present in the resulting outputs maps.
    16091610       */
    1610       toto=getMap(request_outputs->content,"value");
     1611      maps* tmpI=NULL;
     1612      map* tmpIV=getMap(request_inputs1,"RawDataOutput");
     1613      if(tmpIV!=NULL){
     1614        tmpI=getMaps(request_outputs,tmpIV->value);
     1615      }
     1616      if(tmpI==NULL)
     1617        tmpI=request_outputs;
     1618      toto=getMap(tmpI->content,"value");
    16111619      if(toto==NULL){
    16121620        map * errormap = createMap("text",_("Unable to fetch any result"));
     
    16171625      }
    16181626      char mime[1024];
    1619       map* mi=getMap(request_outputs->content,"mimeType");
     1627      map* mi=getMap(tmpI->content,"mimeType");
    16201628#ifdef DEBUG
    16211629      fprintf(stderr,"SERVICE OUTPUTS\n");
     
    16231631      fprintf(stderr,"SERVICE OUTPUTS\n");
    16241632#endif
    1625       map* en=getMap(request_outputs->content,"encoding");
     1633      map* en=getMap(tmpI->content,"encoding");
    16261634      if(mi!=NULL && en!=NULL)
    16271635        sprintf(mime,
     
    16371645      printf("%s",mime);
    16381646      if(mi!=NULL && strncmp(mi->value,"image",5)==0){
    1639         map* rs=getMapFromMaps(request_outputs,request_outputs->name,"size");
     1647        map* rs=getMapFromMaps(tmpI,tmpI->name,"size");
    16401648        fwrite(toto->value,atoi(rs->value),1,stdout);
    16411649      }
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