summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ssh/ssh.c4
-rw-r--r--plugins/telnet/telnet.c9
-rw-r--r--plugins/websocket/websocket.c4
3 files changed, 16 insertions, 1 deletions
diff --git a/plugins/ssh/ssh.c b/plugins/ssh/ssh.c
index 442653d..aaf31ce 100644
--- a/plugins/ssh/ssh.c
+++ b/plugins/ssh/ssh.c
@@ -464,6 +464,10 @@ static void *ssh_client_thread(void *arg)
cleanup:
if (client->hbx_session != NULL) {
+ const char *uname = hybbx_session_username(client->hbx_session);
+ hybbx_log_info("[ssh] session end: user=%s last_rc=%d",
+ (uname && uname[0]) ? uname : "?",
+ (int)client->last_rc);
hybbx_session_close(client->hbx_session);
client->hbx_session = NULL;
}
diff --git a/plugins/telnet/telnet.c b/plugins/telnet/telnet.c
index a857b7d..dd08dd1 100644
--- a/plugins/telnet/telnet.c
+++ b/plugins/telnet/telnet.c
@@ -207,7 +207,7 @@ static void telnet_send_busy(int fd)
return;
}
- (void)send(fd, msg, sizeof(msg) - 1u, 0);
+ (void)send(fd, msg, sizeof(msg) - 1u, MSG_NOSIGNAL);
}
static void *telnet_client_thread(void *arg)
@@ -307,6 +307,13 @@ static void *telnet_client_thread(void *arg)
}
}
+ {
+ const char *uname = hybbx_session_username(session);
+ hybbx_log_info("[telnet] session end: user=%s fd=%d last_rc=%d",
+ (uname && uname[0]) ? uname : "?",
+ client->fd, (int)tctx.last_rc);
+ }
+
hybbx_session_close(session);
shutdown(client->fd, SHUT_RDWR);
close(client->fd);
diff --git a/plugins/websocket/websocket.c b/plugins/websocket/websocket.c
index 4ff2230..f466c5f 100644
--- a/plugins/websocket/websocket.c
+++ b/plugins/websocket/websocket.c
@@ -470,6 +470,10 @@ static void *ws_client_thread(void *arg)
cleanup:
if (client->hbx_session != NULL) {
+ const char *uname = hybbx_session_username(client->hbx_session);
+ hybbx_log_info("[websocket] session end: user=%s last_rc=%d",
+ (uname && uname[0]) ? uname : "?",
+ (int)client->last_rc);
hybbx_session_close(client->hbx_session);
client->hbx_session = NULL;
}
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com