mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
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.
This commit is contained in:
parent
8871894f2d
commit
a609982aa7
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user