mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-02 19:59:28 -05:00
- Fix that ub_event has the facility to deal with callbacks for
fast reload, doq, windows-stop and dnstap. - Fix fast reload test to check if pid exists before acting on it.
This commit is contained in:
parent
a7704ad49f
commit
ba18abcd35
4 changed files with 61 additions and 3 deletions
|
|
@ -1064,7 +1064,7 @@ tube.lo tube.o: $(srcdir)/util/tube.c config.h $(srcdir)/util/tube.h $(srcdir)/u
|
|||
$(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/util/ub_event.h
|
||||
ub_event.lo ub_event.o: $(srcdir)/util/ub_event.c config.h $(srcdir)/util/ub_event.h $(srcdir)/util/log.h \
|
||||
$(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \
|
||||
$(srcdir)/util/tube.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h
|
||||
$(srcdir)/util/tube.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h $(srcdir)/daemon/remote.h
|
||||
ub_event_pluggable.lo ub_event_pluggable.o: $(srcdir)/util/ub_event_pluggable.c config.h $(srcdir)/util/ub_event.h \
|
||||
$(srcdir)/libunbound/unbound-event.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \
|
||||
$(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h \
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@
|
|||
- Fix unbound-control test so it counts the new flush_negative output,
|
||||
also answers the _ta probe from testns and prints command output
|
||||
and skip a thread specific test when no threads are available.
|
||||
- Fix that ub_event has the facility to deal with callbacks for
|
||||
fast reload, doq, windows-stop and dnstap.
|
||||
- Fix fast reload test to check if pid exists before acting on it.
|
||||
|
||||
1 April 2025: Wouter
|
||||
- Fix escape more characters when printing an RR type with an unquoted
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ PRE="../.."
|
|||
kill_pid $NS1_PID
|
||||
kill_pid $NS2_PID
|
||||
if test -f unbound.pid; then
|
||||
kill_pid $UNBOUND_PID
|
||||
if kill -0 $UNBOUND_PID >/dev/null 2>&1; then
|
||||
kill_pid $UNBOUND_PID
|
||||
fi
|
||||
fi
|
||||
rm -f $CONTROL_PATH/controlpipe.$CONTROL_PID
|
||||
echo
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
#include "util/log.h"
|
||||
#include "util/netevent.h"
|
||||
#include "util/tube.h"
|
||||
#include "daemon/remote.h"
|
||||
|
||||
/* We define libevent structures here to hide the libevent stuff. */
|
||||
|
||||
|
|
@ -95,9 +96,29 @@ UB_EV_BITS_CB(comm_timer_callback)
|
|||
UB_EV_BITS_CB(comm_signal_callback)
|
||||
UB_EV_BITS_CB(comm_point_local_handle_callback)
|
||||
UB_EV_BITS_CB(comm_point_raw_handle_callback)
|
||||
UB_EV_BITS_CB(comm_point_http_handle_callback)
|
||||
UB_EV_BITS_CB(tube_handle_signal)
|
||||
UB_EV_BITS_CB(comm_base_handle_slow_accept)
|
||||
UB_EV_BITS_CB(comm_point_http_handle_callback)
|
||||
#ifdef HAVE_NGTCP2
|
||||
UB_EV_BITS_CB(comm_point_doq_callback)
|
||||
#endif
|
||||
UB_EV_BITS_CB(fast_reload_service_cb)
|
||||
#ifdef USE_DNSTAP
|
||||
UB_EV_BITS_CB(dtio_output_cb)
|
||||
UB_EV_BITS_CB(dtio_cmd_cb)
|
||||
UB_EV_BITS_CB(dtio_reconnect_timeout_cb)
|
||||
UB_EV_BITS_CB(dtio_stop_timer_cb)
|
||||
UB_EV_BITS_CB(dtio_stop_ev_cb)
|
||||
UB_EV_BITS_CB(dtio_tap_callback)
|
||||
UB_EV_BITS_CB(dtio_mainfdcallback)
|
||||
#endif
|
||||
#ifdef HAVE_NGTCP2
|
||||
UB_EV_BITS_CB(doq_client_event_cb)
|
||||
UB_EV_BITS_CB(doq_client_timer_cb)
|
||||
#endif
|
||||
#ifdef UB_ON_WINDOWS
|
||||
UB_EV_BITS_CB(worker_win_stop_cb)
|
||||
#endif
|
||||
|
||||
static void (*NATIVE_BITS_CB(void (*cb)(int, short, void*)))(int, short, void*)
|
||||
{
|
||||
|
|
@ -123,6 +144,38 @@ static void (*NATIVE_BITS_CB(void (*cb)(int, short, void*)))(int, short, void*)
|
|||
return my_tube_handle_signal;
|
||||
else if(cb == comm_base_handle_slow_accept)
|
||||
return my_comm_base_handle_slow_accept;
|
||||
#ifdef HAVE_NGTCP2
|
||||
else if(cb == comm_point_doq_callback)
|
||||
return my_comm_point_doq_callback;
|
||||
#endif
|
||||
else if(cb == fast_reload_service_cb)
|
||||
return my_fast_reload_service_cb;
|
||||
#ifdef USE_DNSTAP
|
||||
else if(cb == dtio_output_cb)
|
||||
return my_dtio_output_cb;
|
||||
else if(cb == dtio_cmd_cb)
|
||||
return my_dtio_cmd_cb;
|
||||
else if(cb == dtio_reconnect_timeout_cb)
|
||||
return my_dtio_reconnect_timeout_cb;
|
||||
else if(cb == dtio_stop_timer_cb)
|
||||
return my_dtio_stop_timer_cb;
|
||||
else if(cb == dtio_stop_ev_cb)
|
||||
return my_dtio_stop_ev_cb;
|
||||
else if(cb == dtio_tap_callback)
|
||||
return my_dtio_tap_callback;
|
||||
else if(cb == dtio_mainfdcallback)
|
||||
return my_dtio_mainfdcallback;
|
||||
#endif
|
||||
#ifdef HAVE_NGTCP2
|
||||
else if(cb == doq_client_event_cb)
|
||||
return my_doq_client_event_cb;
|
||||
else if(cb == doq_client_timer_cb)
|
||||
return my_doq_client_timer_cb;
|
||||
#endif
|
||||
#ifdef UB_ON_WINDOWS
|
||||
else if(cb == worker_win_stop_cb)
|
||||
return my_worker_win_stop_cb;
|
||||
#endif
|
||||
else {
|
||||
log_assert(0); /* this NULL callback pointer should not happen,
|
||||
we should have the necessary routine listed above */
|
||||
|
|
|
|||
Loading…
Reference in a new issue