Changeset 839 for branches/prototype-v0/zoo-project/zoo-kernel/service.c
- Timestamp:
- Aug 7, 2017, 2:56:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/service.c
r822 r839 146 146 147 147 /** 148 * Create a new iotype* 149 * 150 * @return a pointer to the allocated iotype 151 */ 152 iotype* createIoType(){ 153 iotype* io=(iotype*)malloc(IOTYPE_SIZE); 154 io->content=NULL; 155 io->next=NULL; 156 return io; 157 } 158 159 /** 148 160 * Create a new map 149 161 * … … 400 412 if(tmp->metadata!=NULL) 401 413 free(tmp->metadata); 414 freeMap(&tmp->additional_parameters); 415 if(tmp->additional_parameters!=NULL) 416 free(tmp->additional_parameters); 402 417 if(tmp->format!=NULL) 403 418 free(tmp->format); … … 831 846 } 832 847 } 833 else 848 else{ 834 849 sprintf(tmp,"%s",key); 850 addToMap(m,"length","1"); 851 } 835 852 map* tmpSize=getMapArray(m,"size",index); 836 853 if(tmpSize!=NULL && strncasecmp(key,"value",5)==0){ … … 964 981 res->content=NULL; 965 982 res->metadata=NULL; 983 res->additional_parameters=NULL; 966 984 res->format=NULL; 967 985 res->defaults=NULL; … … 983 1001 res->content=NULL; 984 1002 res->metadata=NULL; 1003 res->additional_parameters=NULL; 985 1004 res->format=NULL; 986 1005 res->defaults=NULL; … … 1022 1041 fprintf(stderr," > METADATA [%s]\n",tmp->name); 1023 1042 dumpMap(tmp->metadata); 1043 fprintf(stderr," > ADDITIONAL PARAMETERS [%s]\n",tmp->name); 1044 dumpMap(tmp->additional_parameters); 1024 1045 fprintf(stderr," > FORMAT [%s]\n",tmp->format); 1025 1046 iotype* tmpio=tmp->defaults; … … 1139 1160 elements* cursor=e; 1140 1161 elements* tmp=NULL; 1141 if(cursor!=NULL ){1162 if(cursor!=NULL && e->name!=NULL){ 1142 1163 #ifdef DEBUG 1143 1164 fprintf(stderr,">> %s %i\n",__FILE__,__LINE__); … … 1151 1172 tmp->metadata=NULL; 1152 1173 addMapToMap(&tmp->metadata,e->metadata); 1174 tmp->additional_parameters=NULL; 1175 addMapToMap(&tmp->additional_parameters,e->additional_parameters); 1153 1176 if(e->format!=NULL) 1154 1177 tmp->format=zStrdup(e->format); … … 1187 1210 else 1188 1211 tmp->child=NULL; 1189 tmp->next=dupElements(cursor->next); 1212 if(cursor->next!=NULL) 1213 tmp->next=dupElements(cursor->next); 1214 else 1215 tmp->next=NULL; 1190 1216 } 1191 1217 return tmp; … … 1234 1260 fprintf(stderr,"CONTENT MAP\n"); 1235 1261 dumpMap(s->content); 1236 fprintf(stderr,"CONTENT METADATA\n"); 1262 if(s->metadata!=NULL) 1263 fprintf(stderr,"CONTENT METADATA\n"); 1237 1264 dumpMap(s->metadata); 1265 if(s->additional_parameters!=NULL) 1266 fprintf(stderr,"CONTENT AdditionalParameters\n"); 1267 dumpMap(s->additional_parameters); 1238 1268 } 1239 1269 if(s->inputs!=NULL){ … … 1293 1323 res->metadata=NULL; 1294 1324 addMapToMap(&res->metadata,s->metadata); 1325 res->additional_parameters=NULL; 1326 addMapToMap(&res->additional_parameters,s->additional_parameters); 1295 1327 res->inputs=dupElements(s->inputs); 1296 1328 res->outputs=dupElements(s->outputs);
Note: See TracChangeset
for help on using the changeset viewer.