* syslog messages are now sent to the desired facility rather than always
authorArt Cancro <ajc@citadel.org>
Mon, 31 Oct 2005 03:22:59 +0000 (03:22 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 31 Oct 2005 03:22:59 +0000 (03:22 +0000)
  going to LOG_DAEMON.  There was a command line parsing bug.

citadel/ChangeLog
citadel/server_main.c
citadel/sysdep.c

index 4c97a5c2e562e0daaf0fe0c42097b5d262ca8d44..0e07dd32c26578a0351bd01ccc365f3395289354 100644 (file)
@@ -1,5 +1,9 @@
 $Id$
 
+Sun Oct 30 22:22:00 EST 2005 ajc
+* syslog messages are now sent to the desired facility rather than always
+  going to LOG_DAEMON.  There was a command line parsing bug.
+
 Sun Oct 30 21:17:57 EST 2005 ajc
 * Log messages posted to the Aide> room indicating activity such as room
   create/delete/edit operations now use "Room Name" rather than Room Name>
index c29caa7aa9d5cca74356e3be3ed41e20017d3c05..6ee7f9b806efdff4b7be05cd102d5a0258096247 100644 (file)
@@ -78,14 +78,11 @@ int main(int argc, char **argv)
        /* initialize the master context */
        InitializeMasterCC();
 
-       /* set default syslog facility */
-       syslog_facility = LOG_DAEMON;
-
        /* parse command-line arguments */
        for (a=1; a<argc; ++a) {
 
                if (!strncmp(argv[a], "-l", 2)) {
-                       safestrncpy(facility, argv[a], sizeof(facility));
+                       safestrncpy(facility, &argv[a][2], sizeof(facility));
                        syslog_facility = SyslogFacility(facility);
                        enable_syslog = 1;
                }
index 5eac30ef3c1c4beb268710503eabf8716e92d9af..f2e1c5db913379f84b2e5533743e5a0ee65951a2 100644 (file)
@@ -97,7 +97,7 @@ int num_sessions = 0;                         /* Current number of sessions */
 pthread_t indexer_thread_tid;
 pthread_t checkpoint_thread_tid;
 
-int syslog_facility = (-1);
+int syslog_facility = LOG_DAEMON;
 int enable_syslog = 0;
 extern int running_as_daemon;