From: Guus Sliepen Date: Fri, 19 Oct 2007 18:54:43 +0000 (+0000) Subject: Use a dummy function as the read callback for connection bufferevents. Should not... X-Git-Tag: release-1.1pre1~146 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=67d9a72ea2f10f1a2d2eb7c04a41183359d5e1cc;p=tinc Use a dummy function as the read callback for connection bufferevents. Should not be triggered. --- diff --git a/src/net_socket.c b/src/net_socket.c index 1686c609..0b9a1324 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -349,8 +349,13 @@ begin: return; } +void handle_meta_read(struct bufferevent *event, void *data) { + logger(LOG_EMERG, _("handle_meta_read() called")); + abort(); +} + void handle_meta_write(struct bufferevent *event, void *data) { - logger(LOG_EMERG, _("handle_meta_write() called")); + logger(LOG_DEBUG, _("handle_meta_write() called")); } void handle_meta_connection_error(struct bufferevent *event, short what, void *data) { @@ -404,7 +409,7 @@ void setup_outgoing_connection(outgoing_t *outgoing) { event_set(&c->inevent, c->socket, EV_READ | EV_PERSIST, handle_meta_connection_data, c); event_add(&c->inevent, NULL); - c->buffer = bufferevent_new(c->socket, handle_meta_connection_data, handle_meta_write, handle_meta_connection_error, c); + c->buffer = bufferevent_new(c->socket, handle_meta_read, handle_meta_write, handle_meta_connection_error, c); if(!c->buffer) { logger(LOG_EMERG, _("bufferevent_new() failed: %s"), strerror(errno)); abort();