Only show meta connection related debug messages when debug level >= 4

This commit is contained in:
Guus Sliepen 2008-12-11 14:03:52 +00:00
parent 40bebbb19f
commit 8e8fe805c8
2 changed files with 6 additions and 6 deletions

View file

@ -53,13 +53,13 @@ bool send_meta(connection_t *c, const char *buffer, int length) {
return false;
}
logger(LOG_DEBUG, _("Encrypted write %p %p %p %d"), c, c->buffer, outbuf, length);
ifdebug(META) logger(LOG_DEBUG, _("Encrypted write %p %p %p %d"), c, c->buffer, outbuf, length);
bufferevent_write(c->buffer, (void *)outbuf, length);
logger(LOG_DEBUG, _("Done."));
ifdebug(META) logger(LOG_DEBUG, _("Done."));
} else {
logger(LOG_DEBUG, _("Unencrypted write %p %p %p %d"), c, c->buffer, buffer, length);
ifdebug(META) logger(LOG_DEBUG, _("Unencrypted write %p %p %p %d"), c, c->buffer, buffer, length);
bufferevent_write(c->buffer, (void *)buffer, length);
logger(LOG_DEBUG, _("Done."));
ifdebug(META) logger(LOG_DEBUG, _("Done."));
}
return true;
@ -115,7 +115,7 @@ bool receive_meta(connection_t *c) {
inlen -= endp - bufp;
bufp = endp;
} else {
logger(LOG_DEBUG, _("Received encrypted %d bytes"), inlen);
ifdebug(META) logger(LOG_DEBUG, _("Received encrypted %d bytes"), inlen);
evbuffer_expand(c->buffer->input, c->buffer->input->off + inlen);
result = EVP_DecryptUpdate(c->inctx, (unsigned char *)c->buffer->input->buffer + c->buffer->input->off, &outlen, (unsigned char *)bufp, inlen);
if(!result || outlen != inlen) {

View file

@ -355,7 +355,7 @@ void handle_meta_read(struct bufferevent *event, void *data) {
}
void handle_meta_write(struct bufferevent *event, void *data) {
logger(LOG_DEBUG, _("handle_meta_write() called"));
ifdebug(META) logger(LOG_DEBUG, _("handle_meta_write() called"));
}
void handle_meta_connection_error(struct bufferevent *event, short what, void *data) {