From f38a84ce830efefe48838425ab281e0ae2a91d0e Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Fri, 1 Sep 2000 22:41:46 +0000 Subject: [PATCH] 418. [bug] At debug levels >= 10, getting an unexpected socket receive error would crash the server while trying to log the error message. --- CHANGES | 4 ++++ lib/dns/dispatch.c | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index cdcdd0b35a..00a134a540 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ + 418. [bug] At debug levels >= 10, getting an unexpected + socket receive error would crash the server + while trying to log the error message. + 417. [func] Add isc_app_block() and isc_app_unblock(), which allow an application to handle signals while blocking. diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index bea6327c5f..885ef8e8db 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dispatch.c,v 1.65 2000/09/01 07:16:04 explorer Exp $ */ +/* $Id: dispatch.c,v 1.66 2000/09/01 22:41:46 gson Exp $ */ #include @@ -530,14 +530,14 @@ udp_recv(isc_task_t *task, isc_event_t *ev_in) { return; } - dispatch_log(disp, LVL(10), - "odd socket result in udp_recv(): %s\n", - ev->result); - /* * otherwise, on strange error, log it and restart. * XXXMLG */ + dispatch_log(disp, LVL(10), + "odd socket result in udp_recv(): %s", + isc_result_totext(ev->result)); + goto restart; }