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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 589 - (show annotations) (download) (as text)
Wed Jul 22 10:16:59 2009 UTC (12 years, 6 months ago) by aramv
File MIME type: text/x-chdr
File size: 788 byte(s)
Changed flow of code a bit. Checking return values etc
1 #include "nextgen.h"
2 #include "pdl.h"
3 #include "plugin_manager.h"
4
5 NG_RC NG_Init(char *config_file){
6
7 if (AOS_Init() == NG_SUCCESS){
8 #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 }
23
24 return NG_FAILURE;
25 }
26
27 NG_RC NG_Term(){
28 if(pdl_term() == NG_SUCCESS) {
29 if(stopPluginManager() == NG_SUCCESS){
30 AOS_Term();
31 closelog();
32 return NG_SUCCESS;
33 }
34 }
35 printf("PDL failed to stop!\n");
36 return NG_FAILURE;
37 }
38

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