Fix crash is sptps_logger().

Unfortunately, sptps_logger() cannot know if s->handle is pointing to a
connection_t or a node_t. But it needs to print name and hostname in
both cases. So make sure both types have name and hostname fields at the
start with the same offset.
This commit is contained in:
Guus Sliepen 2015-06-10 23:42:17 +02:00
parent bfe231b977
commit 45a46f068c
3 changed files with 4 additions and 2 deletions

View file

@ -59,9 +59,9 @@ typedef struct connection_status_t {
typedef struct connection_t {
char *name; /* name he claims to have */
char *hostname; /* the hostname of its real ip */
union sockaddr_t address; /* his real (internet) ip */
char *hostname; /* the hostname of its real ip */
int protocol_major; /* used protocol */
int protocol_minor; /* used protocol */