summaryrefslogtreecommitdiffstats
path: root/sesman/scp_v0.c
diff options
context:
space:
mode:
Diffstat (limited to 'sesman/scp_v0.c')
-rw-r--r--sesman/scp_v0.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sesman/scp_v0.c b/sesman/scp_v0.c
index cc3712cc..13a1bfc8 100644
--- a/sesman/scp_v0.c
+++ b/sesman/scp_v0.c
@@ -30,6 +30,8 @@
#include "sesman.h"
+#include "libraptorsmiface.h"
+
extern struct config_sesman *g_cfg; /* in sesman.c */
/******************************************************************************/
@@ -79,6 +81,16 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
s_item = session_get_bydata(s->username, s->width, s->height,
s->bpp, s->type, s->client_ip);
+ // RAPTOR session management
+ pid_t serverpid = raptor_sm_get_pid_for_username(s->username);
+ if (serverpid < 0) {
+ // Session NOT already running
+ if (s_item != 0) {
+ log_message( LOG_LEVEL_INFO, "++ [FIXME] scp claimed there was an active session, but the authoritative RAPTOR database disagrees: username %s", s->username);
+ }
+ s_item = 0;
+ }
+
if (s_item != 0)
{
display = s_item->display;