X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Fnet_socket.c;h=d470fef5d9fab40bce12e5b90ffa92eba1293358;hb=3ade33bfac11715190ed3e6cc3589d1a738ce257;hp=97a80584769d7773c97c58c3ab319fe2387c1443;hpb=04de15984f1479d0142bdfa5bd968274aea2209e;p=tinc diff --git a/src/net_socket.c b/src/net_socket.c index 97a80584..d470fef5 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -454,7 +454,7 @@ static void handle_meta_write(int sock, short events, void *data) { connection_t *c = data; - size_t outlen = write(c->socket, c->outbuf.data + c->outbuf.offset, c->outbuf.len - c->outbuf.offset); + ssize_t outlen = send(c->socket, c->outbuf.data + c->outbuf.offset, c->outbuf.len - c->outbuf.offset, 0); if(outlen <= 0) { logger(LOG_ERR, "Onoes, outlen = %zd (%s)", outlen, strerror(errno)); terminate_connection(c, c->status.active); @@ -466,12 +466,6 @@ static void handle_meta_write(int sock, short events, void *data) { event_del(&c->outevent); } -static void handle_meta_connection_error(struct bufferevent *event, short what, void *data) { - connection_t *c = data; - logger(LOG_ERR, "handle_meta_connection_error() called: %d: %s", what, strerror(errno)); - terminate_connection(c, c->status.active); -} - void setup_outgoing_connection(outgoing_t *outgoing) { connection_t *c; node_t *n;