projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup local_address in protocol_edge.c
[tinc]
/
src
/
logger.c
diff --git
a/src/logger.c
b/src/logger.c
index
ad7cef2
..
68a7fb2
100644
(file)
--- 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;
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);
connection_t *c = s->handle;
if(c)
snprintf(message + len, sizeof message - len, " from %s (%s)", c->name, c->hostname);