X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Flogger.c;h=68a7fb2d0401207d1732e0dc29e1ddd50c3742af;hp=ad7cef280c3d95cb210fcfd8e54920baa29e38d1;hb=abb24e9d71b3edb9cacf4c04361cc0dfd4e6a061;hpb=19e0d449ebd06450c9d7f16f032c0806242c7515 diff --git a/src/logger.c b/src/logger.c index ad7cef28..68a7fb2d 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);