Skip to content
Snippets Groups Projects
Commit a71460cc authored by deuce's avatar deuce
Browse files

Don't bother showing client_t info when a client disconnects... it's always

NULL
parent 5ec80211
Branches
Tags
No related merge requests found
...@@ -122,16 +122,21 @@ int main(int argc, char **argv) ...@@ -122,16 +122,21 @@ int main(int argc, char **argv)
t = msg->msg.client_on.client.time; /* sigh */ t = msg->msg.client_on.client.time; /* sigh */
msg->msg.client_on.client.protocol = msg->msg.client_on.strdata; msg->msg.client_on.client.protocol = msg->msg.client_on.strdata;
msg->msg.client_on.client.user = strchr(msg->msg.client_on.strdata, 0)+1; msg->msg.client_on.client.user = strchr(msg->msg.client_on.strdata, 0)+1;
printf("Client %s%s: sock: %d\n addr: %s\n host: %s\n port: %" PRIu16 "\n %s at %s via %s\n", if (msg->msg.client_on.on) {
msg->msg.client_on.on ? "on" : "off", printf("Client %s%s: sock: %d\n addr: %s\n host: %s\n port: %" PRIu16 "\n %s at %s via %s\n",
msg->msg.client_on.update ? " update" : "", msg->msg.client_on.on ? "on" : "off",
msg->msg.client_on.sock, msg->msg.client_on.update ? " update" : "",
msg->msg.client_on.client.addr, msg->msg.client_on.sock,
msg->msg.client_on.client.host, msg->msg.client_on.client.addr,
msg->msg.client_on.client.port, msg->msg.client_on.client.host,
msg->msg.client_on.client.user, msg->msg.client_on.client.port,
ctime(&t), msg->msg.client_on.client.user,
msg->msg.client_on.client.protocol); ctime(&t),
msg->msg.client_on.client.protocol);
}
else {
printf("Client off: sock: %d\n", msg->msg.client_on.sock);
}
break; break;
case STATUS_ERRORMSG: case STATUS_ERRORMSG:
printf("%d - %s\n", msg->msg.errormsg.level, msg->msg.errormsg.msg); printf("%d - %s\n", msg->msg.errormsg.level, msg->msg.errormsg.msg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment