Remove or lower the priority of some debug messages.
[tinc] / src / meta.c
index 27baf8f..0b8a379 100644 (file)
@@ -1,6 +1,6 @@
 /*
     meta.c -- handle the meta communication
-    Copyright (C) 2000-2009 Guus Sliepen <guus@tinc-vpn.org>,
+    Copyright (C) 2000-2013 Guus Sliepen <guus@tinc-vpn.org>,
                   2000-2005 Ivo Timmermans
                   2006      Scott Lamb <slamb@slamb.org>
 
@@ -180,7 +180,7 @@ bool receive_meta(connection_t *c) {
                                if(!c->node) {
                                        if(c->outgoing && proxytype == PROXY_SOCKS4 && c->allow_request == ID) {
                                                if(c->buffer[0] == 0 && c->buffer[1] == 0x5a) {
-                                                       logger(LOG_DEBUG, "Proxy request granted");
+                                                       ifdebug(CONNECTIONS) logger(LOG_DEBUG, "Proxy request granted");
                                                } else {
                                                        logger(LOG_ERR, "Proxy request rejected");
                                                        return false;
@@ -190,7 +190,7 @@ bool receive_meta(connection_t *c) {
                                                        logger(LOG_ERR, "Invalid response from proxy server");
                                                        return false;
                                                }
-                                               if(c->buffer[1] == 0xff) {
+                                               if(c->buffer[1] == (char)0xff) {
                                                        logger(LOG_ERR, "Proxy request rejected: unsuitable authentication method");
                                                        return false;
                                                }
@@ -199,9 +199,9 @@ bool receive_meta(connection_t *c) {
                                                        return false;
                                                }
                                                if(c->buffer[3] == 0) {
-                                                       logger(LOG_DEBUG, "Proxy request granted");
+                                                       ifdebug(CONNECTIONS) logger(LOG_DEBUG, "Proxy request granted");
                                                } else {
-                                                       logger(LOG_DEBUG, "Proxy request rejected");
+                                                       logger(LOG_ERR, "Proxy request rejected");
                                                        return false;
                                                }
                                        } else {