From a609982aa7796e6ca0d668955bb294b5dcb81de9 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Tue, 10 Nov 1998 11:39:13 +0000 Subject: [PATCH] Small change to the isc_task_send() function: return ISC_R_SUCCESS if the event was queued, return ISC_R_NORESOURCES if not. The error return needs to be something different. --- lib/isc/include/isc/task.h | 2 +- lib/isc/task.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/isc/include/isc/task.h b/lib/isc/include/isc/task.h index 1b5f44c5ef..7d2791429f 100644 --- a/lib/isc/include/isc/task.h +++ b/lib/isc/include/isc/task.h @@ -75,7 +75,7 @@ isc_result_t isc_task_create(isc_taskmgr_t, void isc_task_attach(isc_task_t, isc_task_t *); void isc_task_detach(isc_task_t *); -void isc_task_send(isc_task_t, +isc_result_t isc_task_send(isc_task_t, isc_event_t *); unsigned int isc_task_purge(isc_task_t, void *, isc_eventtype_t); diff --git a/lib/isc/task.c b/lib/isc/task.c index a1b06c5172..86f462e81f 100644 --- a/lib/isc/task.c +++ b/lib/isc/task.c @@ -267,7 +267,7 @@ isc_task_detach(isc_task_t *taskp) { *taskp = NULL; } -void +isc_result_t isc_task_send(isc_task_t task, isc_event_t *eventp) { isc_boolean_t was_idle = ISC_FALSE; isc_boolean_t discard = ISC_FALSE; @@ -303,7 +303,7 @@ isc_task_send(isc_task_t task, isc_event_t *eventp) { if (discard) { isc_event_free(&event); *eventp = NULL; - return; + return (ISC_R_NORESOURCES); } if (was_idle) { @@ -339,6 +339,8 @@ isc_task_send(isc_task_t task, isc_event_t *eventp) { *eventp = NULL; XTRACE("sent"); + + return (ISC_R_SUCCESS); } unsigned int