diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-06-13 07:25:27 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-06-13 07:25:27 +0000 |
commit | a1301e597de40ee80009b60903c4e47571b42669 (patch) | |
tree | 8fe9762762e71306bdefb6d7b3afff1b13a281bc /usr.sbin/ftp-proxy/ftp-proxy.c | |
parent | 7322f1e75b54a750bfe2b885fad040c385d7bf02 (diff) |
Better error messages. Include the function causing the problem and do not
include the program name in logmsg() plus exit_daemon() does not return so
make it a void function. OK mpf@
Diffstat (limited to 'usr.sbin/ftp-proxy/ftp-proxy.c')
-rw-r--r-- | usr.sbin/ftp-proxy/ftp-proxy.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.sbin/ftp-proxy/ftp-proxy.c b/usr.sbin/ftp-proxy/ftp-proxy.c index b35c0448611..131991a4bb8 100644 --- a/usr.sbin/ftp-proxy/ftp-proxy.c +++ b/usr.sbin/ftp-proxy/ftp-proxy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp-proxy.c,v 1.18 2008/04/22 02:22:22 joel Exp $ */ +/* $OpenBSD: ftp-proxy.c,v 1.19 2008/06/13 07:25:26 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl> @@ -91,7 +91,7 @@ int client_parse_cmd(struct session *s); void client_read(struct bufferevent *, void *); int drop_privs(void); void end_session(struct session *); -int exit_daemon(void); +void exit_daemon(void); int getline(char *, size_t *); void handle_connection(const int, short, void *); void handle_signal(int, short, void *); @@ -315,7 +315,7 @@ end_session(struct session *s) session_count--; } -int +void exit_daemon(void) { struct session *s, *next; @@ -329,9 +329,6 @@ exit_daemon(void) closelog(); exit(0); - - /* NOTREACHED */ - return (-1); } int @@ -525,7 +522,7 @@ handle_signal(int sig, short event, void *arg) * Signal handler rules don't apply, libevent decouples for us. */ - logmsg(LOG_ERR, "%s exiting on signal %d", __progname, sig); + logmsg(LOG_ERR, "exiting on signal %d", sig); exit_daemon(); } |