X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Flogger.c;h=e46d926f42dac76dd98f3a21774da44cc6a4463b;hb=ae89a25695411149a7499189c9771762ad1f1726;hp=ad7cef280c3d95cb210fcfd8e54920baa29e38d1;hpb=19e0d449ebd06450c9d7f16f032c0806242c7515;p=tinc diff --git a/src/logger.c b/src/logger.c index ad7cef28..e46d926f 100644 --- a/src/logger.c +++ b/src/logger.c @@ -127,6 +127,8 @@ static void sptps_logger(sptps_t *s, int s_errno, const char *format, va_list ap if(message[len - 1] == '\n') message[--len] = 0; + // WARNING: s->handle can point to a connection_t or a node_t, + // but both types have the name and hostname fields at the same offsets. connection_t *c = s->handle; if(c) snprintf(message + len, sizeof message - len, " from %s (%s)", c->name, c->hostname); @@ -208,6 +210,5 @@ void closelogger(void) { case LOGMODE_NULL: case LOGMODE_STDERR: break; - break; } }