Added debugging messages
This commit is contained in:
parent
365e645d94
commit
4e9cfd7bd5
1 changed files with 4 additions and 3 deletions
|
@ -28,8 +28,9 @@ const struct Libp2pProtocolHandler* protocol_compare(const unsigned char* incomi
|
||||||
*/
|
*/
|
||||||
int libp2p_protocol_marshal(const unsigned char* incoming, size_t incoming_size, struct SessionContext* session, struct Libp2pVector* handlers) {
|
int libp2p_protocol_marshal(const unsigned char* incoming, size_t incoming_size, struct SessionContext* session, struct Libp2pVector* handlers) {
|
||||||
const struct Libp2pProtocolHandler* handler = protocol_compare(incoming, incoming_size, handlers);
|
const struct Libp2pProtocolHandler* handler = protocol_compare(incoming, incoming_size, handlers);
|
||||||
if (handler != NULL) {
|
if (handler == NULL) {
|
||||||
return handler->HandleMessage(incoming, incoming_size, session, handler->context);
|
libp2p_logger_error("protocol", "Unable to find handler.\n");
|
||||||
}
|
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
return handler->HandleMessage(incoming, incoming_size, session, handler->context);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue