Fix format strings for Windows.
[tinc] / src / net_socket.c
index 97a8058..a1dfcd3 100644 (file)
@@ -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;