Added some debugging to dht
This commit is contained in:
parent
f1c8ceedbd
commit
1489e4fbf8
2 changed files with 6 additions and 2 deletions
|
@ -253,8 +253,11 @@ int libp2p_routing_dht_handle_message(struct SessionContext* session, struct Pee
|
|||
break;
|
||||
}
|
||||
// if we have something to send, send it.
|
||||
if (result_buffer != NULL && !session->default_stream->write(session, result_buffer, result_buffer_size))
|
||||
goto exit;
|
||||
if (result_buffer != NULL) {
|
||||
libp2p_logger_debug("dht_protocol", "Sending message back to caller\n");
|
||||
if (!session->default_stream->write(session, result_buffer, result_buffer_size))
|
||||
goto exit;
|
||||
}
|
||||
retVal = 1;
|
||||
exit:
|
||||
if (buffer != NULL)
|
||||
|
|
|
@ -19,6 +19,7 @@ void libp2p_logger_init() {
|
|||
logger_classes = libp2p_utils_vector_new(1);
|
||||
libp2p_logger_add_class("secio");
|
||||
libp2p_logger_add_class("null");
|
||||
libp2p_logger_add_class("dht_protocol");
|
||||
}
|
||||
|
||||
/***
|
||||
|
|
Loading…
Reference in a new issue