/[pdpsoft]/trunk/grid-mw-security/ees/src/app/eic_test.c
ViewVC logotype

Diff of /trunk/grid-mw-security/ees/src/app/eic_test.c

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

revision 1570 by aramv, Tue Mar 16 17:35:17 2010 UTC revision 1571 by aramv, Wed Mar 17 11:44:14 2010 UTC
# Line 40  int process_xacml (int listenport) Line 40  int process_xacml (int listenport)
40      xacml_server_set_port(server, listenport);      xacml_server_set_port(server, listenport);
41    
42      xacml_server_get_port(server, &port);      xacml_server_get_port(server, &port);
43      printf         (   "SCAS ready... listening on port %hu.\n", port);      eef_log(LOG_INFO, "SCAS ready... listening on port %hu.\n", port);
44    
45    
46      /* Set the I/O handler object */      /* Set the I/O handler object */
# Line 51  int process_xacml (int listenport) Line 51  int process_xacml (int listenport)
51      while (!done)      while (!done)
52      {      {
53          pause();          pause();
54          printf ("SCAS service stop.\n");          eef_log(LOG_INFO, "SCAS service stop.\n");
55      }      }
56    
     /* fprintf(stderr, "SCAS: Shutting down... signal was: %d\n", gsig); */  
     /* scas_log (1,    "Shutting down... signal was: %d\n", gsig); */  
   
57      xacml_server_destroy(server);      xacml_server_destroy(server);
58      fflush(stdout);      fflush(stdout);
59      fflush(stderr);      fflush(stderr);
# Line 93  int main (int argc, char* argv[]){ Line 90  int main (int argc, char* argv[]){
90    
91    printf("Parsing config file %s\n", config_file);    printf("Parsing config file %s\n", config_file);
92    
93    /*#if !ENABLE_DEBUG*/  #if !ENABLE_DEBUG
94    /*EEF_Daemonize();*/    EEF_Daemonize();
95    #endif
96    
97    signal(SIGHUP, signal_handler); /* catch hangup signal */    signal(SIGHUP, signal_handler); /* catch hangup signal */
98    signal(SIGTERM, signal_handler); /* catch kill signal */    signal(SIGTERM, signal_handler); /* catch kill signal */
   /*#endif*/  
99    
100          if(EEF_Init(config_file, NULL, 0, NULL) == EES_FAILURE){          if(EEF_Init(config_file, NULL, 0, NULL) == EES_FAILURE){
101      eef_log(LOG_ERR, "Failed to parse config file (%s), exiting...", config_file);      eef_log(LOG_ERR, "Failed to parse config file (%s), exiting...", config_file);
102    } else {    } else {
103      /*make_socket();*/      /*make_socket();*/
104      aos_start_threading();      aos_start_threading();
105        process_xacml(PORT);
106      /* start threading */      /* start threading */
107      for(t=0; t < NUM_THREADS; t++){      /*for(t=0; t < NUM_THREADS; t++){*/
108        printf("Creating thread %li!\n", t);      /*printf("Creating thread %li!\n", t);*/
109        /*rc = pthread_create(&threads[t], NULL, (void*)(void*) EEF_Run, (void*)(t));*/        /*rc = pthread_create(&threads[t], NULL, (void*)(void*) EEF_Run, (void*)(t));*/
110        /*rc = pthread_join(threads[t], &status);*/        /*rc = pthread_join(threads[t], &status);*/
111    
112        /* Fire up SAML2-XACML2 */        /* Fire up SAML2-XACML2 */
113        process_xacml(PORT);        /*process_xacml(PORT);*/
114    
115      }        /*}*/
116    }    }
117    printf("terminated!\n");    printf("terminated!\n");
118    
119    pthread_exit(NULL);    pthread_exit(NULL);
120    
121    return 0;    return 0;
122  }  }
123    

Legend:
Removed from v.1570  
changed lines
  Added in v.1571

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