Index: include/asterisk/logger.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/logger.h,v
retrieving revision 1.6
diff -u -r1.6 logger.h
--- include/asterisk/logger.h	16 Mar 2003 22:37:31 -0000	1.6
+++ include/asterisk/logger.h	2 Dec 2003 05:16:04 -0000
@@ -15,6 +15,7 @@
 #define _LOGGER_H
 
 #include <stdarg.h>
+#include <syslog.h>
 
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
@@ -37,7 +38,7 @@
  * ast_log(LOG_WHATEVER, "Problem with the %s Captain.  We should get some more.  Will %d be enough?", "flux capacitor", 10);
  * where WHATEVER is one of ERROR, DEBUG, EVENT, NOTICE, or WARNING depending on which log you wish to output to.
  */
-extern void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...)
+extern void ast_logger(int level, const char *file, int line, const char *function, const char *fmt, ...)
 	__attribute__ ((format (printf, 5, 6)));
 
 //! Send a verbose message (based on verbose level)
@@ -54,13 +55,23 @@
 extern int ast_register_verbose(void (*verboser)(const char *string, int opos, int replacelast, int complete));
 extern int ast_unregister_verbose(void (*verboser)(const char *string, int opos, int replacelast, int complete));
 extern int ast_verbose_dmesg(void (*verboser)(const char *string, int opos, int replacelast, int complete));
+extern void ast_console_puts(const char *string);
+
 #define _A_ __FILE__, __LINE__, __PRETTY_FUNCTION__
 
-#define LOG_DEBUG	0, _A_
-#define LOG_EVENT   1, _A_
-#define LOG_NOTICE  2, _A_
-#define LOG_WARNING 3, _A_
-#define LOG_ERROR	4, _A_
+    /*
+     * take care of Asterisk log levels that have 
+     * different names from those in <sys/syslog.h>
+     */
+#ifndef LOG_ERROR
+#define LOG_ERROR LOG_ERR
+#endif /* LOG_ERROR */
+
+#ifndef LOG_EVENT
+#define LOG_EVENT LOG_INFO
+#endif /* LOG_EVENT */
+
+#define ast_log(L, ...) ast_logger(L, _A_, __VA_ARGS__)
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }
Index: logger.c
===================================================================
RCS file: /usr/cvsroot/asterisk/logger.c,v
retrieving revision 1.14
diff -u -r1.14 logger.c
--- logger.c	26 Nov 2003 22:00:07 -0000	1.14
+++ logger.c	2 Dec 2003 05:16:05 -0000
@@ -17,6 +17,8 @@
 #include <unistd.h>
 #include <time.h>
 #include <asterisk/lock.h>
+#define SYSLOG_NAMES /* so we can map syslog facilities names to their numeric values,
+		        from <sys/syslog.h> which is included by logger.h */
 #include <asterisk/logger.h>
 #include <asterisk/options.h>
 #include <asterisk/channel.h>
@@ -42,38 +44,39 @@
 	struct msglist *next;
 } *list = NULL, *last = NULL;
 
-struct logfile {
-	char fn[256];
-	int logflags;
-	FILE *f;
+struct logchannel {
+        int logmask;
         int facility; /* syslog */
-	struct logfile *next;
+        int console;  /* console logging */
+        struct logchannel *next;
 };
 
-static struct logfile *logfiles = NULL;
+static struct logchannel *logchannels = NULL;
 
 static int msgcnt = 0;
 
-static FILE *eventlog = NULL;
-
 static char *levels[] = {
-	"DEBUG",
-	"EVENT",
-	"NOTICE",
-	"WARNING",
-	"ERROR"
+    "EMERG",
+    "ALERT",
+    "CRIT",
+    "ERROR",
+    "WARNING",
+    "NOTICE",
+    "EVENT",
+    "DEBUG"
 };
 
 static int colors[] = {
-	COLOR_BRGREEN,
-	COLOR_BRBLUE,
-	COLOR_YELLOW,
-	COLOR_BRRED,
-	COLOR_RED
+    COLOR_RED,
+    COLOR_RED,
+    COLOR_RED,
+    COLOR_BRRED,
+    COLOR_YELLOW,
+    COLOR_BRCYAN,
+    COLOR_BRBLUE,
+    COLOR_BRGREEN
 };
 
-
-
 static int make_components(char *s, int lineno)
 {
 	char *w;
@@ -82,209 +85,154 @@
 	stringp=s;
 	w = strsep(&stringp, ",");
 	while(w) {
-		while(*w && (*w < 33))
-			w++;
-		if (!strcasecmp(w, "debug"))
-			res |= (1 << 0);
-		else if (!strcasecmp(w, "notice"))
-			res |= (1 << 2);
-		else if (!strcasecmp(w, "warning"))
-			res |= (1 << 3);
-		else if (!strcasecmp(w, "error"))
-			res |= (1 << 4);
-		else {
-			fprintf(stderr, "Logfile Warning: Unknown keyword '%s' at line %d of logger.conf\n", w, lineno);
-		}
-		w = strsep(&stringp, ",");
+	    while(*w && (*w < 33))
+		w++;
+	    if (!strcasecmp(w, "emerg")) 
+		res |= (1 << LOG_EMERG);
+	    else if (!strcasecmp(w, "alert"))
+		res |= (1 << LOG_ALERT);
+	    else if (!strcasecmp(w, "crit"))
+		res |= (1 << LOG_CRIT);
+	    else if (!strcasecmp(w, "error")) 
+		res |= (1 << LOG_ERR);
+	    else if (!strcasecmp(w, "warning"))
+		res |= (1 << LOG_WARNING);
+	    else if (!strcasecmp(w, "notice"))
+		res |= (1 << LOG_NOTICE);
+	    else if (!strcasecmp(w, "info") || !strcasecmp(w, "event"))
+		res |= (1 << LOG_INFO);
+	    else if (!strcasecmp(w, "debug"))
+		res |= (1 << LOG_DEBUG);
+	    else {
+		fprintf(stderr, "Logfile Warning: Unknown keyword '%s' at line %d of logger.conf\n", w, lineno);
+	    }
+	    w = strsep(&stringp, ",");
 	}
 	return res;
 }
 
-static struct logfile *make_logfile(char *fn, char *components, int lineno)
+static struct logchannel *make_logchannel(char *channel, char *components, int lineno)
 {
-	struct logfile *f;
-	char tmp[256];
-	if (!strlen(fn))
+	struct logchannel *chan;
+	char *facility;
+	CODE *cptr;
+
+	if (!strlen(channel))
 		return NULL;
-	f = malloc(sizeof(struct logfile));
-	if (f) {
-		memset(f, 0, sizeof(f));
-		strncpy(f->fn, fn, sizeof(f->fn) - 1);
-		if (!strcasecmp(fn, "ignore")) {
-			f->f = NULL;
-		} else if (!strcasecmp(fn, "console")) {
-			f->f = stdout;
-		} else if (!strcasecmp(fn, "syslog")) {
-		  f->f = NULL;
-		  f->facility = LOG_LOCAL0;
-		} else {
-			if (fn[0] == '/') 
-				strncpy(tmp, fn, sizeof(tmp) - 1);
-			else
-				snprintf(tmp, sizeof(tmp), "%s/%s", (char *)ast_config_AST_LOG_DIR, fn);
-			f->f = fopen(tmp, "a");
-			if (!f->f) {
-				/* Can't log here, since we're called with a lock */
-				fprintf(stderr, "Logger Warning: Unable to open log file '%s': %s\n", tmp, strerror(errno));
+	chan = malloc(sizeof(struct logchannel));
+
+	if (chan) {
+		memset(chan, 0, sizeof(chan));
+		if (!strcasecmp(channel, "console")) {
+		    chan->console = 1;
+		    chan->logmask = make_components(components, lineno);
+		} else if (!strncasecmp(channel, "syslog", 6)) {
+		    /*
+		     * syntax is:
+		     *  syslog.facility => level,level,level
+		     */
+		    facility = strchr(channel, '.');
+		    if(!facility++ || !facility) {
+			fprintf(stderr, "Logger Warning: no syslog facility in logger.conf\n");
+			free(chan);
+			return NULL;
+		    }
+		    /*
+		     * Walk through the list of facilitynames (defined in sys/syslog.h)
+		     * to see if we can find the one we have been given
+		     */
+		    chan->facility = -1;
+		    cptr = facilitynames;
+		    while (cptr->c_name) {
+			if (!strncasecmp(facility, cptr->c_name, sizeof(cptr->c_name))) {
+			    chan->facility = cptr->c_val;
+			    break;
+			}
+			cptr++;
+		    }
+		    if (0 > chan->facility) {
+			fprintf(stderr, "Logger Warning: bad syslog facility in logger.conf\n");
+			free(chan);
+			return NULL;
+		    }
+
+		    chan->logmask = -1;
+		    cptr = prioritynames;
+		    while(cptr->c_name) {
+			if (!strncasecmp(components, cptr->c_name, sizeof(cptr->c_name))) {
+			    chan->logmask = cptr->c_val;
+			    break;
 			}
+			cptr++;
+		    }
+		    if (0 > chan->logmask) {
+			fprintf(stderr, "Logger Warning: bad syslog priority in logger.conf\n");
+			free(chan);
+			return NULL;
+		    }
+		    openlog("asterisk", LOG_PID, chan->facility);
+		} else {
+		    fprintf(stderr, "Logger Warning: unknown/obsolete log channel %s\n", channel);
+		    free(chan);
+		    return NULL;
 		}
-		f->logflags = make_components(components, lineno);
-		
 	}
-	return f;
+	return chan;
 }
 
 static void init_logger_chain(void)
 {
-	struct logfile *f, *cur;
+	struct logchannel *chan, *cur;
 	struct ast_config *cfg;
 	struct ast_variable *var;
 
+	/* delete our list of log channels */
 	ast_mutex_lock(&loglock);
-
-	/* Free anything that is here */
-	f = logfiles;
-	while(f) {
-		cur = f->next;
-		if (f->f && (f->f != stdout) && (f->f != stderr))
-			fclose(f->f);
-		free(f);
-		f = cur;
+	chan = logchannels;
+	while (chan) {
+	    cur = chan->next;
+	    free(chan);
+	    chan = cur;
 	}
+	logchannels = NULL;
+	ast_mutex_unlock(&loglock);
 
-	logfiles = NULL;
+	/* close syslog */
+	closelog();
 
-	ast_mutex_unlock(&loglock);
 	cfg = ast_load("logger.conf");
-	ast_mutex_lock(&loglock);
 	
 	/* If no config file, we're fine */
-	if (!cfg) {
-		ast_mutex_unlock(&loglock);
-		return;
-	}
+	if (!cfg)
+	    return;
+
+	ast_mutex_lock(&loglock);
 	var = ast_variable_browse(cfg, "logfiles");
 	while(var) {
-		f = make_logfile(var->name, var->value, var->lineno);
-		if (f) {
-			f->next = logfiles;
-			logfiles = f;
+		chan = make_logchannel(var->name, var->value, var->lineno);
+		if (chan) {
+			chan->next = logchannels;
+			logchannels = chan;
 		}
 		var = var->next;
 	}
-	if (!logfiles) {
-		/* Gotta have at least one.  We'll make a NULL one */
-		logfiles = make_logfile("ignore", "", -1);
-	}
+
 	ast_destroy(cfg);
 	ast_mutex_unlock(&loglock);
-	
-
 }
 
-int reload_logger(int rotate)
+int reload_logger(void)
 {
-	char old[AST_CONFIG_MAX_PATH];
-	char tmp[AST_CONFIG_MAX_PATH];
-	char new[AST_CONFIG_MAX_PATH];
-	struct logfile *f;
-
-	int x;
-
-	ast_mutex_lock(&loglock);
-	if (eventlog) 
-	  fclose(eventlog);
-	else 
-	  rotate = 0;
-
-
-
-	mkdir((char *)ast_config_AST_LOG_DIR, 0755);
-	snprintf(old, sizeof(old), "%s/%s", (char *)ast_config_AST_LOG_DIR, EVENTLOG);
-
-	for(x=0;;x++) {
-	  snprintf(new, sizeof(new), "%s/%s.%d", (char *)ast_config_AST_LOG_DIR, EVENTLOG,x);
-	  eventlog = fopen((char *)new, "r");
-	  if(eventlog) 
-	    fclose(eventlog);
-	  else
-	    break;
-	}
-
-	if(rotate) {
-	  /* do it */
-	  if(! link(old,new))
-	    unlink(old);
-	  strcpy(tmp,old);
-	}
-
-
-	f = logfiles;
-	while(f) {
-	  if (f->f && (f->f != stdout) && (f->f != stderr)) {
-	    fclose(f->f);
-	    snprintf(old, sizeof(old), "%s/%s", (char *)ast_config_AST_LOG_DIR,f->fn);
-
-	    for(x=0;;x++) {
-	      snprintf(new, sizeof(new), "%s/%s.%d", (char *)ast_config_AST_LOG_DIR,f->fn,x);
-	      eventlog = fopen((char *)new, "r");
-	      if(eventlog) 
-		fclose(eventlog);
-	      else
-		break;
-	    }
-	    
-	    if(rotate) {
-	      /* do it */
-	      if(! link(old,new))
-		unlink(old);
-	      f->f = fopen((char *)old, "a");
-	    }
-	    
-
-	  }
-
-
-	  f = f->next;
-	}
-
-
-	eventlog = fopen((char *)tmp, "a");
-	ast_mutex_unlock(&loglock);
-
-	if (eventlog) {
-		init_logger_chain();
-		ast_log(LOG_EVENT, "Restarted Asterisk Event Logger\n");
-		if (option_verbose)
-			ast_verbose("Asterisk Event Logger restarted\n");
-		return 0;
-	} else 
-		ast_log(LOG_ERROR, "Unable to create event log: %s\n", strerror(errno));
-	init_logger_chain();
-	return -1;
+    init_logger_chain();
+    ast_log(LOG_EVENT, "Restarted Asterisk Event Logger\n");
+    if (option_verbose)
+	ast_verbose("Asterisk Event Logger restarted\n");
+    return 0;
 }
 
 static int handle_logger_reload(int fd, int argc, char *argv[])
 {
-	if(reload_logger(0))
-	{
-		ast_cli(fd, "Failed to reloadthe logger\n");
-		return RESULT_FAILURE;
-	}
-	else
-		return RESULT_SUCCESS;
-}
-
-
-
-
-
-
-
-
-static int handle_logger_rotate(int fd, int argc, char *argv[])
-{
-	if(reload_logger(1))
+	if(reload_logger())
 	{
 		ast_cli(fd, "Failed to reloadthe logger\n");
 		return RESULT_FAILURE;
@@ -301,13 +249,7 @@
 
 static char logger_reload_help[] =
 "Usage: logger reload\n"
-"       Reopens the log files.  Use after a rotating the log files\n";
-
-
-static char logger_rotate_help[] =
-"Usage: logger reload\n"
-"       Rotates and Reopens the log files.\n";
-
+"       Reloads the logger subsystem state.  Use after restarting syslogd(8)\n";
 
 static struct ast_cli_entry reload_logger_cli = 
 	{ { "logger", "reload", NULL }, 
@@ -315,129 +257,99 @@
 	logger_reload_help };
 
 
-static struct ast_cli_entry rotate_logger_cli = 
-	{ { "logger", "rotate", NULL }, 
-	handle_logger_rotate, "Reopens the log files",
-	logger_rotate_help };
-
-
-
 static int handle_SIGXFSZ(int sig) {
-  reload_logger(1);
-  ast_log(LOG_EVENT,"Rotated Logs Per SIGXFSZ\n");
-  if (option_verbose)
-    ast_verbose("Rotated Logs Per SIGXFSZ\n");
-  
-  return 0;
+    reload_logger();
+    ast_log(LOG_EVENT,"Rotated Logs Per SIGXFSZ\n");
+    if (option_verbose)
+	ast_verbose("Rotated Logs Per SIGXFSZ\n");
+    return 0;
 }
 
 int init_logger(void)
 {
-	char tmp[AST_CONFIG_MAX_PATH];
-
-
-
 	/* auto rotate if sig SIGXFSZ comes a-knockin */
 	(void) signal(SIGXFSZ,(void *) handle_SIGXFSZ);
 
 	/* register the relaod logger cli command */
 	ast_cli_register(&reload_logger_cli);
-	ast_cli_register(&rotate_logger_cli);
-	
-	mkdir((char *)ast_config_AST_LOG_DIR, 0755);
-	snprintf(tmp, sizeof(tmp), "%s/%s", (char *)ast_config_AST_LOG_DIR, EVENTLOG);
-	eventlog = fopen((char *)tmp, "a");
-	if (eventlog) {
-		init_logger_chain();
-		ast_log(LOG_EVENT, "Started Asterisk Event Logger\n");
-		if (option_verbose)
-			ast_verbose("Asterisk Event Logger Started %s\n",(char *)tmp);
-		return 0;
-	} else 
-		ast_log(LOG_ERROR, "Unable to create event log: %s\n", strerror(errno));
+
+	/* create log channels */
 	init_logger_chain();
-	return -1;
+	return 0;
 }
 
+static void ast_log_vsyslog(int level, const char *file, int line, const char *function, const char *fmt, va_list args) {
+    char buf[BUFSIZ];
+
+    if(file && line && function) {
+	snprintf(buf, sizeof(buf), "%s[%ld]: %s:%d in %s: ",
+		 levels[level], (long)pthread_self(), file, line, function);
+    } else {
+	snprintf(buf, sizeof(buf), "VERBOSE[%ld]: ", (long)pthread_self());
+	level = LOG_DEBUG;
+    }
+    vsnprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), fmt, args);
+    syslog(level, buf);
+}
 
-extern void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...)
+/*
+ * send log messages to syslog and/or the console
+ */
+extern void ast_logger(int level, const char *file, int line, const char *function, const char *fmt, ...)
 {
-	char date[256];
-	char tmp[80];
-	char tmp2[80];
-	char tmp3[80];
-	char tmp4[80];
-	char linestr[80];
-	time_t t;
-	struct tm tm;
-	struct logfile *f;
+    struct logchannel *chan;
+    char buf[BUFSIZ];
+    va_list ap;
+	
+    if (!option_verbose && !option_debug && !(level == LOG_DEBUG)) {
+	return;
+    }
+
+    if (logchannels) {
+	chan = logchannels;
+	while(chan) {
+	    if (chan->facility && (chan->logmask >= level)) {
+		va_start(ap, fmt);
+		ast_log_vsyslog(level, file, line, function, fmt, ap);
+		va_end(ap);
+	    } else if (chan->console && chan->logmask && (1 << level)) {
+		char linestr[128];
+		char tmp1[80], tmp2[80], tmp3[80], tmp4[80];
+		char date[256]; time_t t; struct tm tm;
+
+		ast_mutex_lock(&loglock);
 
-	va_list ap;
-	if (!option_verbose && !option_debug && (!level)) {
-		return;
-	}
-	ast_mutex_lock(&loglock);
-	if (level == 1 /* Event */) {
 		time(&t);
-		localtime_r(&t,&tm);
-		if (&tm) {
-			/* Log events into the event log file, with a different format */
-			strftime(date, sizeof(date), "%b %e %T", &tm);
-			fprintf(eventlog, "%s asterisk[%d]: ", date, getpid());
-			va_start(ap, fmt);
-			vfprintf(eventlog, fmt, ap);
-			va_end(ap);
-			fflush(eventlog);
-		} else
-			/** Cannot use ast_log() from locked section of ast_log()!
-			    ast_log(LOG_WARNING, "Unable to retrieve local time?\n"); **/
-			fprintf(stderr, "ast_log: Unable to retrieve local time for %ld?\n", (long)t);
-	} else {
-		if (logfiles) {
-			f = logfiles;
-			while(f) {
-			  if (f->logflags & (1 << level) && f->facility) {
-			    time(&t);
-			    localtime_r(&t,&tm);
-			    strftime(date, sizeof(date), "%b %e %T", &tm);
-			    
-			    openlog("asterisk_pbx",LOG_PID,f->facility);
-			    syslog(LOG_INFO|f->facility,"%s %s[%ld]: File %s, Line %d (%s): ",date, 
-				   levels[level], (long)pthread_self(), file, line, function);
-			    closelog();
-
-			  }
-			  else if (f->logflags & (1 << level) && f->f) {
-					if ((f->f != stdout) && (f->f != stderr)) {
-						time(&t);
-						localtime_r(&t,&tm);
-						strftime(date, sizeof(date), "%b %e %T", &tm);
-						fprintf(f->f, "%s %s[%ld]: File %s, Line %d (%s): ", date, levels[level], (long)pthread_self(), file, line, function);
-					} else {
-						sprintf(linestr, "%d", line);
-						fprintf(f->f, "%s[%ld]: File %s, Line %s (%s): ",
-																term_color(tmp, levels[level], colors[level], 0, sizeof(tmp)),
-																(long)pthread_self(),
-																term_color(tmp2, file, COLOR_BRWHITE, 0, sizeof(tmp2)),
-																term_color(tmp3, linestr, COLOR_BRWHITE, 0, sizeof(tmp3)),
-																term_color(tmp4, function, COLOR_BRWHITE, 0, sizeof(tmp4)));
-					}
-					va_start(ap, fmt);
-					vfprintf(f->f, fmt, ap);
-					va_end(ap);
-					fflush(f->f);
-				}
-				f = f->next;
-			}
-		} else {
-			fprintf(stdout, "%s[%ld]: File %s, Line %d (%s): ", levels[level], (long)pthread_self(), file, line, function);
-			va_start(ap, fmt);
-			vfprintf(stdout, fmt, ap);
-			va_end(ap);
-			fflush(stdout);
+		localtime_r(&t, &tm);
+		if(!&tm) {
+		    /** Cannot use ast_log() from locked section of ast_log()!
+			ast_log(AST_LOG_WARNING, "Unable to retrieve local time?\n"); **/
+		    fprintf(stderr, "ast_log: Unable to retrieve local time for %ld?\n", (long)t);
+		    ast_mutex_unlock(&loglock);
+		    return;
 		}
+		strftime(date, sizeof(date), "%b %e %T", &tm);
+
+		sprintf(linestr, "%d", line);
+		snprintf(buf, sizeof(buf), "%s %s[%ld]: %s:%s %s: ",
+			 date,
+			 term_color(tmp1, levels[level], colors[level], 0, sizeof(tmp1)),
+			 (long)pthread_self(),
+			 term_color(tmp2, file, COLOR_BRWHITE, 0, sizeof(tmp2)),
+			 term_color(tmp3, linestr, COLOR_BRWHITE, 0, sizeof(tmp3)),
+			 term_color(tmp4, function, COLOR_BRWHITE, 0, sizeof(tmp4)));
+		ast_console_puts(buf);
+
+		va_start(ap, fmt);
+		vsnprintf(buf, sizeof(buf), fmt, ap);
+		va_end(ap);
+		ast_console_puts(buf);
+
+		ast_mutex_unlock(&loglock);
+	    }
+	    chan = chan->next;
 	}
-	ast_mutex_unlock(&loglock);
+    }
 }
 
 extern void ast_verbose(const char *fmt, ...)
@@ -498,6 +410,13 @@
 	else 
 		replacelast = pos = 0;
 	va_end(ap);
+
+	va_start(ap, fmt);
+	if(stuff[strlen(stuff)-1] == '\n')
+	    stuff[strlen(stuff)-1] = '\0';
+	ast_log_vsyslog(0, NULL, 0, NULL, fmt, ap);
+	va_end(ap);
+
 	ast_mutex_unlock(&msglist_lock);
 }
 
Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.43
diff -u -r1.43 asterisk.c
--- asterisk.c	1 Dec 2003 02:47:19 -0000	1.43
+++ asterisk.c	2 Dec 2003 05:16:08 -0000
@@ -148,13 +148,34 @@
 	return write(fd, s, strlen(s) + 1);
 }
 
+/*
+ * write the string to all attached console clients
+ */
+static void ast_network_puts(const char *string)
+{
+    int x;
+    for (x=0;x<AST_MAX_CONNECTS; x++) {
+	if (consoles[x].fd > -1) 
+	    fdprint(consoles[x].p[1], string);
+    }
+}
+
+
+/*
+ * write the string to the console, and all attached
+ * console clients
+ */
+void ast_console_puts(const char *string)
+{
+    fputs(string, stdout);
+    fflush(stdout);
+    ast_network_puts(string);
+}
+
 static void network_verboser(const char *s, int pos, int replace, int complete)
+     /* ARGUSED */
 {
-	int x;
-	for (x=0;x<AST_MAX_CONNECTS; x++) {
-		if (consoles[x].fd > -1) 
-			fdprint(consoles[x].p[1], s);
-	}
+    ast_network_puts(s);
 }
 
 static pthread_t lthread;
Index: asterisk.h
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.h,v
retrieving revision 1.11
diff -u -r1.11 asterisk.h
--- asterisk.h	26 Nov 2003 22:00:07 -0000	1.11
+++ asterisk.h	2 Dec 2003 05:16:08 -0000
@@ -43,7 +43,7 @@
 /* Provided by frame.c */
 extern int init_framer(void);
 /* Provided by logger.c */
-extern int reload_logger(int);
+extern int reload_logger(void);
 /* Provided by term.c */
 extern int term_init(void);
 /* Provided by db.c */
