X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol.c;h=d04f9ef6af923da9a35978ebaa1d83aaa73e29a9;hp=144def2160c8564403fdba6d680b2727c72705c2;hb=3f0c1f6b81dd305b0ded2424f9f7da441c7d97b6;hpb=3fae14fae5a347823679ef694ab630b4991a201d diff --git a/src/protocol.c b/src/protocol.c index 144def21..d04f9ef6 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -35,7 +35,7 @@ bool strictsubnets = false; static bool (*request_handlers[])(connection_t *) = { id_h, metakey_h, challenge_h, chal_reply_h, ack_h, - status_h, error_h, termreq_h, + NULL, NULL, NULL, ping_h, pong_h, add_subnet_h, del_subnet_h, add_edge_h, del_edge_h, @@ -80,7 +80,7 @@ bool send_request(connection_t *c, const char *format, ...) { buffer[sizeof(buffer) - 1] = 0; va_end(args); - if(len < 0 || len > sizeof(buffer) - 1) { + if(len < 0 || (size_t)len > sizeof(buffer) - 1) { logger(LOG_ERR, "Output buffer overflow while sending request to %s (%s)", c->name, c->hostname); return false; @@ -193,7 +193,7 @@ void exit_requests(void) { } bool seen_request(char *request) { - past_request_t *new, p = {NULL}; + past_request_t *new, p = {}; p.request = request;