- Timestamp:
- Jan 8, 2011, 4:02:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-kernel/service_internal.c
r65 r66 1606 1606 if(res!=SERVICE_FAILED){ 1607 1607 /** 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. 1609 1610 */ 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"); 1611 1619 if(toto==NULL){ 1612 1620 map * errormap = createMap("text",_("Unable to fetch any result")); … … 1617 1625 } 1618 1626 char mime[1024]; 1619 map* mi=getMap( request_outputs->content,"mimeType");1627 map* mi=getMap(tmpI->content,"mimeType"); 1620 1628 #ifdef DEBUG 1621 1629 fprintf(stderr,"SERVICE OUTPUTS\n"); … … 1623 1631 fprintf(stderr,"SERVICE OUTPUTS\n"); 1624 1632 #endif 1625 map* en=getMap( request_outputs->content,"encoding");1633 map* en=getMap(tmpI->content,"encoding"); 1626 1634 if(mi!=NULL && en!=NULL) 1627 1635 sprintf(mime, … … 1637 1645 printf("%s",mime); 1638 1646 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"); 1640 1648 fwrite(toto->value,atoi(rs->value),1,stdout); 1641 1649 }
Note: See TracChangeset
for help on using the changeset viewer.