agent pool logging improvements

This commit is contained in:
2019-01-13 12:25:22 +02:00
parent 9df44cc960
commit 77947d17e5

View File

@@ -89,14 +89,14 @@ static void *servlet(void *args) /* Serve the connection -- threadable */
continue;
}
log(VERBOSE, "Client msg: \"%s\"",
buf.chunk.data);
log(VERBOSE, "Agent [%s] msg: \"%s\"",
agent->ip, buf.chunk.data);
/* TODO: Insert msg handler here */
continue;
}
if (SSL_get_shutdown(agent->ssl)
== SSL_RECEIVED_SHUTDOWN)
log(VERBOSE, "SSL_RECEIVED_SHUTDOWN from agent [%s]",
log(VERBOSE, "Agent [%s] has shutdown.",
agent->ip);
else {
log(VERBOSE, "Client didn't send data!");
@@ -107,7 +107,6 @@ static void *servlet(void *args) /* Serve the connection -- threadable */
SSL_write(agent->ssl, &buf,
sizeof(struct msg_t));
}
log(INFO, "Agent [%s] disconnected.", agent->ip);
} while (bytes);
}
SSL_free(agent->ssl); /* release SSL state */