Ignore:
Timestamp:
Apr 11, 2015, 2:40:05 AM (9 years ago)
Author:
djay
Message:

Fix issue for downloaded inputs which support multiple values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/service.h

    r623 r627  
    637637
    638638  /**
     639   * Add a key and an integer value to an existing map.
     640   *
     641   * @param m the map to add the KVP
     642   * @param n the key to add
     643   * @param v the corresponding value to add
     644   */
     645  static void addIntToMap(map* m,const char* n,const int v){
     646    char svalue[10];
     647    sprintf(svalue,"%d",v);
     648    if(hasKey(m,n)==false){
     649      map* _cursor=m;
     650      while(_cursor->next!=NULL){
     651        _cursor=_cursor->next;
     652      }
     653      _cursor->next=createMap(n,svalue);
     654    }
     655    else{
     656      map *tmp=getMap(m,n);
     657      if(tmp->value!=NULL)
     658        free(tmp->value);
     659      tmp->value=zStrdup(svalue);
     660    }
     661  }
     662
     663  /**
    639664   * Add a key and a binary value to an existing map.
    640665   *
     
    10101035    }
    10111036
    1012     char *tmpV[11]={
     1037    char *tmpV[12]={
    10131038      (char*)"size",
    10141039      (char*)"value",
    10151040      (char*)"uom",
    10161041      (char*)"Reference",
     1042      (char*)"Order",
    10171043      (char*)"cache_file",
    10181044      (char*)"fmimeType",
     
    10261052    addToMap(_cursor->content,"length",tmpLen);
    10271053    int i=0;
    1028     for(i=0;i<11;i++){
     1054    for(i=0;i<12;i++){
    10291055      map* tmpVI=getMap(tmp->content,tmpV[i]);
    10301056      if(tmpVI!=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