diff options
Diffstat (limited to 'dnstap/unbound-dnstap-socket.c')
| -rw-r--r-- | dnstap/unbound-dnstap-socket.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/dnstap/unbound-dnstap-socket.c b/dnstap/unbound-dnstap-socket.c index 8e28be4e89ec..3de8ab3f0899 100644 --- a/dnstap/unbound-dnstap-socket.c +++ b/dnstap/unbound-dnstap-socket.c @@ -1012,6 +1012,7 @@ void dtio_tap_callback(int fd, short ATTR_UNUSED(bits), void* arg) if(verbosity) log_info("bidirectional stream"); if(!reply_with_accept(data)) { tap_data_free(data); + return; } } else if(data->len >= 4 && sldns_read_uint32(data->frame) == FSTRM_CONTROL_FRAME_STOP && data->is_bidirectional) { @@ -1166,8 +1167,13 @@ int sig_quit = 0; /** signal handler for user quit */ static RETSIGTYPE main_sigh(int sig) { - if(!sig_quit) - fprintf(stderr, "exit on signal %d\n", sig); + if(!sig_quit) { + char str[] = "exit on signal \n"; + str[15] = '0' + (sig/10)%10; + str[16] = '0' + sig%10; + /* simple cast to void will not silence Wunused-result */ + (void)!write(STDERR_FILENO, str, strlen(str)); + } if(sig_base) { ub_event_base_loopexit(sig_base); sig_base = NULL; @@ -1375,14 +1381,6 @@ int worker_handle_request(struct comm_point* ATTR_UNUSED(c), return 0; } -int worker_handle_reply(struct comm_point* ATTR_UNUSED(c), - void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), - struct comm_reply* ATTR_UNUSED(reply_info)) -{ - log_assert(0); - return 0; -} - int worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c), void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), struct comm_reply* ATTR_UNUSED(reply_info)) @@ -1456,14 +1454,6 @@ struct outbound_entry* libworker_send_query( return 0; } -int libworker_handle_reply(struct comm_point* ATTR_UNUSED(c), - void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), - struct comm_reply* ATTR_UNUSED(reply_info)) -{ - log_assert(0); - return 0; -} - int libworker_handle_service_reply(struct comm_point* ATTR_UNUSED(c), void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), struct comm_reply* ATTR_UNUSED(reply_info)) |
