X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fmeta.c;h=e62c3b7d859230202834aa5638b76800012f4a28;hp=27baf8fea48018dcfa57f42958ac13ba2153641b;hb=09d60499af3acef2ba9bd7be15e8d1c44249f8d5;hpb=c6b1643c2bcc727db4aed69bc58eb1f31903fdcf diff --git a/src/meta.c b/src/meta.c index 27baf8fe..e62c3b7d 100644 --- a/src/meta.c +++ b/src/meta.c @@ -1,6 +1,6 @@ /* meta.c -- handle the meta communication - Copyright (C) 2000-2009 Guus Sliepen , + Copyright (C) 2000-2014 Guus Sliepen , 2000-2005 Ivo Timmermans 2006 Scott Lamb @@ -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 {