Ignore:
Timestamp:
Jan 22, 2017, 5:32:02 PM (5 years ago)
Author:
djay
Message:

Return default iotype if no value has been provided. Fix potential segfault in case tmpIoType is null.

File:
1 edited

Legend:

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

    r794 r805  
    635635iotype* getIoTypeFromElement(elements* e,char *name, map* values){
    636636  elements* cursor=e;
    637   if(values!=NULL)
     637  if(values!=NULL){
    638638    while(cursor!=NULL){
    639639      if(strcasecmp(cursor->name,name)==0 && (cursor->defaults!=NULL || cursor->supported!=NULL)){
     
    651651      cursor=cursor->next;
    652652    }
     653  }else{
     654    while(cursor!=NULL){
     655      if(strcasecmp(cursor->name,name)==0 && cursor->defaults!=NULL){
     656        return cursor->defaults;
     657      }
     658      cursor=cursor->next;
     659    }
     660  }
    653661  return NULL;
    654662}
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