mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
named_server_servestale could leave the server in exclusive mode if a error occurs.
This commit is contained in:
parent
ebcaae4ae5
commit
c8b07932e4
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
|||||||
|
5000. [bug] named_server_servestale() could leave the server in
|
||||||
|
exclusive mode if an error occured. [GL #441]
|
||||||
|
|
||||||
4999. [cleanup] Remove custom printf implementaion in lib/isc/print.c.
|
4999. [cleanup] Remove custom printf implementaion in lib/isc/print.c.
|
||||||
[GL #261]
|
[GL #261]
|
||||||
|
|
||||||
|
@ -14931,6 +14931,7 @@ named_server_servestale(named_server_t *server, isc_lex_t *lex,
|
|||||||
dns_stale_answer_t staleanswersok = dns_stale_answer_conf;
|
dns_stale_answer_t staleanswersok = dns_stale_answer_conf;
|
||||||
isc_boolean_t wantstatus = ISC_FALSE;
|
isc_boolean_t wantstatus = ISC_FALSE;
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
|
isc_boolean_t exclusive = ISC_FALSE;
|
||||||
|
|
||||||
/* Skip the command name. */
|
/* Skip the command name. */
|
||||||
ptr = next_token(lex, text);
|
ptr = next_token(lex, text);
|
||||||
@ -14982,6 +14983,7 @@ named_server_servestale(named_server_t *server, isc_lex_t *lex,
|
|||||||
|
|
||||||
result = isc_task_beginexclusive(server->task);
|
result = isc_task_beginexclusive(server->task);
|
||||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||||
|
exclusive = ISC_TRUE;
|
||||||
|
|
||||||
for (view = ISC_LIST_HEAD(server->viewlist);
|
for (view = ISC_LIST_HEAD(server->viewlist);
|
||||||
view != NULL;
|
view != NULL;
|
||||||
@ -15037,12 +15039,14 @@ named_server_servestale(named_server_t *server, isc_lex_t *lex,
|
|||||||
}
|
}
|
||||||
found = ISC_TRUE;
|
found = ISC_TRUE;
|
||||||
}
|
}
|
||||||
isc_task_endexclusive(named_g_server->task);
|
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
result = ISC_R_NOTFOUND;
|
result = ISC_R_NOTFOUND;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
if (exclusive)
|
||||||
|
isc_task_endexclusive(named_g_server->task);
|
||||||
|
|
||||||
if (isc_buffer_usedlength(*text) > 0)
|
if (isc_buffer_usedlength(*text) > 0)
|
||||||
(void) putnull(text);
|
(void) putnull(text);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user