Merge branch 'winwarnings' of https://github.com/dechamps/tinc into 1.1
[tinc] / src / meta.c
index 887da4a..fbd3e26 100644 (file)
@@ -76,7 +76,7 @@ bool send_meta(connection_t *c, const char *buffer, int length) {
 
 void broadcast_meta(connection_t *from, const char *buffer, int length) {
        for list_each(connection_t, c, connection_list)
-               if(c != from && c->status.active)
+               if(c != from && c->edge)
                        send_meta(c, buffer, length);
 }
 
@@ -142,7 +142,7 @@ bool receive_meta(connection_t *c) {
        inlen = recv(c->socket, inbuf, sizeof inbuf - c->inbuf.len, 0);
 
        if(inlen <= 0) {
-               if(!inlen || !errno) {
+               if(!inlen || !sockerrno) {
                        logger(DEBUG_CONNECTIONS, LOG_NOTICE, "Connection closed by %s (%s)",
                                           c->name, c->hostname);
                } else if(sockwouldblock(sockerrno))