Changeset 379 for trunk/zoo-project/zoo-kernel/service_conf.y
- Timestamp:
- Dec 23, 2012, 11:50:33 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_conf.y
r226 r379 151 151 : INFCAR ID Attributeetoile SUPCAR 152 152 { 153 #ifdef DEBUG_SERVICE_CONF 154 fprintf(stderr,"(%s %d) %s\n",__FILE__,__LINE__,$2); 155 fflush(stderr); 156 #endif 153 157 if(my_service->content==NULL){ 154 158 #ifdef DEBUG_SERVICE_CONF … … 226 230 #ifdef DEBUG_SERVICE_CONF 227 231 fprintf(stderr,"(DATAOUTPUTS - %d) ALLOCATE current_element (%s)\n",__LINE__,$2); 232 fflush(stderr); 228 233 #endif 229 234 current_element=(elements*)malloc(ELEMENTS_SIZE); … … 272 277 if(wait_metadata==true){ 273 278 if(current_content!=NULL){ 279 #ifdef DEBUG_SERVICE_CONF 280 fprintf(stderr,"add current_content to current_element->content\n"); 281 fprintf(stderr,"LINE %d",__LINE__); 282 #endif 274 283 addMapToMap(¤t_element->metadata,current_content); 275 284 current_element->next=NULL; … … 290 299 current_element->next=NULL; 291 300 if($2!=NULL) 292 current_element->format=strdup($2);301 current_element->format=strdup($2); 293 302 current_element->defaults=NULL; 294 303 current_element->supported=NULL; … … 312 321 #ifdef DEBUG_SERVICE_CONF 313 322 printf("* Identifiant : %s\n",$2); 323 fflush(stdout); 314 324 #endif 315 325 } … … 357 367 EmptyElemTag 358 368 : INFCAR ID Attributeetoile SLASH SUPCAR { 369 #ifdef DEBUG_SERVICE_CONF 370 fprintf(stderr,"(%s %d)\n",__FILE__,__LINE__); 371 #endif 359 372 if(strncasecmp($2,"Default",7)==0){ 360 373 wait_defaults=false; … … 386 399 : INFCAR SLASH ID SUPCAR 387 400 { 401 #ifdef DEBUG_SERVICE_CONF 402 fprintf(stderr,"(%s %d)\n",__FILE__,__LINE__); 403 #endif 388 404 if(strcmp($3,"DataInputs")==0){ 389 405 current_data=1; … … 495 511 | EPAIR { 496 512 #ifdef DEBUG_SERVICE_CONF 513 fprintf(stderr,"(%s %d)\n",__FILE__,__LINE__); 497 514 fprintf(stderr,"EPAIR FOUND !! \n"); 498 515 fprintf(stderr,"[%s=>%s]\n",curr_key,$1); … … 510 527 fprintf(stderr,"[ZOO: service_conf.y line %d free(%s)]\n",__LINE__,curr_key); 511 528 #endif 512 //current_content->next=NULL;513 529 } 514 530 else{ … … 524 540 } 525 541 #ifdef DEBUG_SERVICE_CONF 526 fprintf(stderr,"EPAIR FOUND !! \n");527 542 fprintf(stderr,"[%s=>%s]\n",curr_key,$1); 528 543 fprintf(stderr,"[ZOO: service_conf.y line %d free(%s)]\n",__LINE__,curr_key); 544 dumpMap(current_content); 529 545 fflush(stderr); 530 546 #endif … … 540 556 processid 541 557 : ANID { 558 #ifdef DEBUG_SERVICE_CONF 559 fprintf(stderr,"(%s %d)\n",__FILE__,__LINE__); 560 #endif 542 561 if(data==-1){ 543 562 data=1; … … 690 709 free(current_element); 691 710 current_element=NULL; 711 current_element=(elements*)malloc(ELEMENTS_SIZE); 712 char *cen=strdup($1); 713 current_element->name=(char*)malloc((strlen(cen)-1)*sizeof(char)); 714 cen[strlen(cen)-1]=0; 715 cen+=1; 716 sprintf(current_element->name,"%s",cen); 717 cen-=1; 718 free(cen); 719 current_element->content=NULL; 720 current_element->metadata=NULL; 721 current_element->format=NULL; 722 current_element->defaults=NULL; 723 current_element->supported=NULL; 724 current_element->next=NULL; 692 725 } 693 726 else{ 694 727 #ifdef DEBUG_SERVICE_CONF 695 728 fprintf(stderr,"NAME OUT %s\n",$1); 696 fprintf(stderr,"(DATAOUTPUTS - 545) SET NAME OF current_element\n");729 fprintf(stderr,"(DATAOUTPUTS - %d) SET NAME OF current_element %s\n",__LINE__,$1); 697 730 #endif 698 731 if($1!=NULL){ 699 732 char *cen=strdup($1); 700 current_element->name=(char*)malloc((strlen(cen) -1)*sizeof(char*));733 current_element->name=(char*)malloc((strlen(cen))*sizeof(char*)); 701 734 cen[strlen(cen)-1]=0; 702 735 #ifdef DEBUG
Note: See TracChangeset
for help on using the changeset viewer.