[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[or-cvs] removed loglevel from global namespace. severity level is s...



Update of /home/or/cvsroot/src/or
In directory moria.seul.org:/tmp/cvs-serv18515/src/or

Modified Files:
	main.c test_config.c 
Log Message:
removed loglevel from global namespace. severity level is set using log() with a NULL format argument now. example: log(LOG_ERR,NULL);


Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- main.c	12 Jul 2002 17:12:08 -0000	1.8
+++ main.c	12 Jul 2002 18:14:17 -0000	1.9
@@ -4,7 +4,6 @@
 /********* START VARIABLES **********/
 
 static or_options_t options; /* command-line and config-file options */
-int loglevel;
 int global_role;
 
 static connection_t *connection_array[MAXCONNECTIONS] =
@@ -332,9 +331,8 @@
   signal (SIGINT, catch); /* to catch ^c so we can exit cleanly */
 
   if ( getoptions(argc,argv,&options) ) exit(1);
-  /* assign global vars from options. maybe get rid of these globals later */
-  loglevel = options.loglevel;
-  global_role = options.GlobalRole;
+  log(options.loglevel,NULL);         /* assign logging severity level from options */
+  global_role = options.GlobalRole;   /* assign global_role from options. FIX: remove from global namespace later. */
 
   ERR_load_crypto_strings();
   retval = do_main_loop();

Index: test_config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test_config.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- test_config.c	9 Jul 2002 19:57:38 -0000	1.1
+++ test_config.c	12 Jul 2002 18:14:17 -0000	1.2
@@ -1,7 +1,5 @@
 #include "or.h"
 
-int loglevel;
-
 int main(int ac, char **av)
 {
    or_options_t options;