From b92062d6ea8dbad8b5e299a80bacd0010ecb6aef Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 12 Mar 2015 22:36:28 +1100 Subject: [PATCH] Add IP address to client drop message --- src/stratifier.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index e13e4301..4e7308de 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1270,16 +1270,18 @@ static void client_drop_message(char **msg, const stratum_instance_t *client, co { switch(dropped) { case 1: - ASPRINTF(msg, "Client %"PRId64" user %s worker %s disconnected %s", - id, client->user_instance->username, client->workername, lazily ? "lazily" : ""); + ASPRINTF(msg, "Client %"PRId64" %s user %s worker %s disconnected %s", + id, client->address, client->user_instance->username, + client->workername, lazily ? "lazily" : ""); break; case 2: - ASPRINTF(msg, "Client %"PRId64" user %s worker %s dropped %s", - id, client->user_instance->username, client->workername, lazily ? "lazily" : ""); + ASPRINTF(msg, "Client %"PRId64" %s user %s worker %s dropped %s", + id, client->address, client->user_instance->username, + client->workername, lazily ? "lazily" : ""); break; case 3: - ASPRINTF(msg, "Workerless client %"PRId64" dropped %s", - id, lazily ? "lazily" : ""); + ASPRINTF(msg, "Workerless client %"PRId64" %s dropped %s", + id, client->address, lazily ? "lazily" : ""); break; } }