Update: Add Client Address to CONNECT reject error message.

Update: comment out the generating CONNACK reply.

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2016-10-18 10:06:02 +09:00
parent 9b7c25b28c
commit b87c8412f8
6 changed files with 34 additions and 13 deletions

View File

@@ -113,7 +113,8 @@ void ClientRecvTask::run()
log(client, packet, &data.clientID);
if (!client)
{
WRITELOG("%s Client was rejected. CONNECT message has been discarded.%s\n", ERRMSG_HEADER, ERRMSG_FOOTER);
char buf[128];
WRITELOG("%s Client(%s) was rejected. CONNECT message has been discarded.%s\n", ERRMSG_HEADER, _sensorNetwork->getSenderAddress()->sprint(buf), ERRMSG_FOOTER);
delete packet;
continue;
}