Changeset 465 for trunk/zoo-project/zoo-kernel/service_conf.y
- Timestamp:
- Apr 23, 2014, 3:05:01 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_conf.y
r453 r465 24 24 static bool wait_outputs=false; 25 25 static bool wait_data=false; 26 static int services_c=0;27 26 static service* my_service=NULL; 28 static map* previous_content=NULL;29 27 static map* current_content=NULL; 30 28 static elements* current_element=NULL; 31 static map* scontent=NULL;32 29 static char* curr_key; 33 30 static int debug=0; … … 772 769 * definition file. 773 770 */ 774 int getServiceFromFile(const char* file,service** service){ 775 776 freeMap(&previous_content); 777 previous_content=NULL; 778 freeMap(¤t_content); 779 current_content=NULL; 780 freeMap(&scontent); 771 int getServiceFromFile(maps* conf,const char* file,service** service){ 772 if(current_content!=NULL){ 773 freeMap(¤t_content); 774 free(current_content); 775 current_content=NULL; 776 } 781 777 #ifdef DEBUG_SERVICE_CONF 782 778 fprintf(stderr,"(STARTING)FREE current_element\n"); 783 779 #endif 784 freeElements(¤t_element); 785 free(current_element); 786 current_element=NULL; 780 if(current_element!=NULL){ 781 freeElements(¤t_element); 782 free(current_element); 783 current_element=NULL; 784 } 787 785 my_service=NULL; 788 scontent=NULL;789 786 790 787 wait_maincontent=true; … … 810 807 int resultatYYParse = srparse() ; 811 808 809 #ifdef DEBUG_SERVICE_CONF 810 fprintf(stderr,"RESULT: %d %d\n",resultatYYParse,wait_outputs); 811 #endif 812 812 if(wait_outputs && current_element!=NULL && current_element->name!=NULL){ 813 813 if(my_service->outputs==NULL){ … … 848 848 dumpService(my_service); 849 849 #endif 850 *service=my_service; 850 if(wait_outputs<0 || my_service==NULL || my_service->name==NULL || my_service->content==NULL || my_service->inputs==NULL || my_service->outputs==NULL){ 851 setMapInMaps(conf,"lenv","message",srlval.chaine); 852 #ifndef WIN32 853 srlex_destroy(); 854 #endif 855 return -1; 856 } 857 else 858 *service=my_service; 851 859 852 860 #ifndef WIN32
Note: See TracChangeset
for help on using the changeset viewer.