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

Contents of /trunk/grid-mw-security/ees/src/app/xacml_test.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1242 - (show annotations) (download) (as text)
Mon Dec 7 15:53:43 2009 UTC (12 years, 8 months ago) by aramv
File MIME type: text/x-chdr
File size: 853 byte(s)
Added a new test program to test XACML library linking
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <pthread.h>
4 #include "config.h"
5 #include "eef.h"
6 #include "xacml.h"
7
8 #define NUM_THREADS 2
9
10 int main (int argc, char* argv[]){
11 char* config_file;
12 if(argc > 1){
13 config_file = argv[1];
14 } else {
15 config_file = "examples/example_1.pdl";
16 }
17
18 printf("Parsing config file %s\n", config_file);
19
20 if(EEF_Init(config_file, NULL, 0, NULL) == EES_FAILURE){
21 eef_log(LOG_ERR, "Failed to parse config file (%s), exiting...", config_file);
22 } else {
23 /* start threading */
24 /*for(t=0; t < NUM_THREADS; t+=2){*/
25 /*printf("Creating thread %li!\n", t);*/
26 /*rc = pthread_create(&threads[t], NULL, threaded_aos_getting, (void*)(t));*/
27 /*rc = pthread_create(&threads[t+1], NULL, threaded_aos_setting, (void*)t+1);*/
28 /*}*/
29 /*pthread_exit(NULL);*/
30 }
31 EEF_Term();
32 return 0;
33 }
34
35

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