[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/smtpap
In directory moria.seul.org:/tmp/cvs-serv18515/src/smtpap
Modified Files:
smtpap.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: smtpap.c
===================================================================
RCS file: /home/or/cvsroot/src/smtpap/smtpap.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- smtpap.c 26 Jun 2002 22:45:50 -0000 1.1.1.1
+++ smtpap.c 12 Jul 2002 18:14:17 -0000 1.2
@@ -8,6 +8,9 @@
/*
* Changes :
* $Log$
+ * Revision 1.2 2002/07/12 18:14:17 montrose
+ * removed loglevel from global namespace. severity level is set using log() with a NULL format argument now. example: log(LOG_ERR,NULL);
+ *
* Revision 1.1.1.1 2002/06/26 22:45:50 arma
* initial commit: current code
*
@@ -133,7 +136,6 @@
#include "smtpap.h"
#include "io.h"
-int loglevel = LOG_ERR;
struct timeval conn_tout;
struct timeval *conn_toutp = &conn_tout;
@@ -1141,6 +1143,7 @@
int main(int argc, char *argv[])
{
+ int loglevel = LOG_DEBUG;
int retval = 0;
char c; /* command-line option */
@@ -1166,7 +1169,7 @@
struct sigaction sa;
char *errtest = NULL; /* for detecting strtoul() errors */
-
+
/* set default listening port */
p = htons(SMTPAP_LISTEN_PORT);
@@ -1198,7 +1201,7 @@
print_usage();
return 0;
break;
- case 'l':
+ case 'l':
if (!strcmp(optarg,"emerg"))
loglevel = LOG_EMERG;
else if (!strcmp(optarg,"alert"))
@@ -1234,7 +1237,9 @@
abort();
}
}
-
+
+ log(loglevel,NULL); /* assign severity level for logger */
+
/* the -f option is mandatory */
if (conf_filename == NULL)
{