X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_socket.c;h=a1dfcd3552cec4b2545313f03a9b32d70035cb08;hb=79e9a4f743b7b59fed968575f6b36171cf4a0063;hp=97a80584769d7773c97c58c3ab319fe2387c1443;hpb=04de15984f1479d0142bdfa5bd968274aea2209e;p=tinc diff --git a/src/net_socket.c b/src/net_socket.c index 97a80584..a1dfcd35 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -454,9 +454,9 @@ 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)); + logger(LOG_ERR, "Onoes, outlen = %d (%s)", (int)outlen, strerror(errno)); terminate_connection(c, c->status.active); return; } @@ -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;