/[pdpsoft]/trunk/grid-mw-security/ees/src/nextgen/ng_common.c
ViewVC logotype

Diff of /trunk/grid-mw-security/ees/src/nextgen/ng_common.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 588 by aramv, Tue Jul 21 16:06:57 2009 UTC revision 589 by aramv, Wed Jul 22 10:16:59 2009 UTC
# Line 4  Line 4 
4    
5  NG_RC NG_Init(char *config_file){  NG_RC NG_Init(char *config_file){
6    
7          if (AOS_Init()){          if (AOS_Init() == NG_SUCCESS){
8                  return 1; /* Initialization (like the malloc()) failed */      #ifdef ENABLE_DEBUG
9          setlogmask (LOG_UPTO (LOG_DEBUG));
10        #else
11          setlogmask (LOG_UPTO (LOG_NOTICE));
12        #endif
13        openlog ("ees", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
14    
15        /* if startPluginManager returns 1, it has failed */
16        if(startPluginManager() == NG_SUCCESS){
17          if(pdl_init(config_file) == NG_SUCCESS){
18            yyparse();
19            return NG_SUCCESS;
20          }
21        }
22          }          }
 #ifdef ENABLE_DEBUG  
         setlogmask (LOG_UPTO (LOG_DEBUG));  
 #else  
   setlogmask (LOG_UPTO (LOG_NOTICE));  
 #endif  
         openlog ("ees", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);  
   
   /* if startPluginManager returns 1, it has failed */  
         if(startPluginManager()==NULL){  
     return NG_FAILURE;  
   }  
   
   if(pdl_init(config_file) == NG_SUCCESS){  
     printf("Fooboo\n");  
     yyparse();  
     printf("Barboo\n");  
   }  
   
         return NG_SUCCESS;  
23    
24      return NG_FAILURE;
25  }  }
26    
27  NG_RC NG_Term(){  NG_RC NG_Term(){
28          stopPluginManager();    if(pdl_term() == NG_SUCCESS) {
29    if(pdl_term() == NG_FAILURE) {      if(stopPluginManager() == NG_SUCCESS){
30      printf("PDL failed to stop!\n");        AOS_Term();
31          closelog();
32          return NG_SUCCESS;
33        }
34    }    }
35          closelog();    printf("PDL failed to stop!\n");
36          AOS_Term();    return NG_FAILURE;
         return NG_SUCCESS;  
37  }  }
38    

Legend:
Removed from v.588  
changed lines
  Added in v.589

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28