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