Ignore:
Timestamp:
Aug 7, 2012, 12:28:05 PM (12 years ago)
Author:
djay
Message:

Fix multiple values for the same identifier.

File:
1 edited

Legend:

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

    r360 r362  
    9999 */
    100100int appendMapsToMaps(maps* m,maps* mo,maps* mi,elements* elem){
    101 
    102   map* tmap=getMapType(mo->content);
     101  maps* tmpMaps=getMaps(mo,mi->name);
     102  map* tmap=getMapType(tmpMaps->content);
     103  elements* el=getElements(elem,mi->name);
     104  int hasEl=1;
     105  if(el==NULL)
     106    hasEl=-1;
    103107  if(tmap==NULL){
    104     tmap=getMapType(elem->defaults->content);
    105   }
    106 
    107   map* testMap=getMap(elem->content,"maxOccurs");
     108    if(hasEl>0)
     109      tmap=getMapType(el->defaults->content);     
     110  }
     111
     112  map* testMap=NULL;
     113  if(hasEl>0){
     114    testMap=getMap(el->content,"maxOccurs");
     115  }else{
     116    testMap=createMap("maxOccurs","unbounded");
     117  }
     118
    108119  if(testMap!=NULL){
    109120    if(strncasecmp(testMap->value,"unbounded",9)!=0 && atoi(testMap->value)>1){
     
    116127    }else{
    117128      if(strncasecmp(testMap->value,"unbounded",9)==0){
     129        if(hasEl<0){
     130          freeMap(&testMap);
     131          free(testMap);
     132        }
    118133        if(addMapsArrayToMaps(&mo,mi,tmap->name)<0){
    119134          char emsg[1024];
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