summaryrefslogtreecommitdiffstats
path: root/sesman
diff options
context:
space:
mode:
authorjsorg71 <jay.sorg@gmail.com>2014-04-17 22:07:50 -0700
committerjsorg71 <jay.sorg@gmail.com>2014-04-17 22:07:50 -0700
commit4f4a7a8c8ccaafa742b45bfc30c321b7b58d8e58 (patch)
treef15a7723a6a8683ab9c6b50980473befae61a9b6 /sesman
parentd198063279a33e056b89b73be1606ee2ac76986b (diff)
parent6318d8ef0f3ab2ab5975f3a26fa39aa534bb0bf2 (diff)
downloadxrdp-proprietary-4f4a7a8c8ccaafa742b45bfc30c321b7b58d8e58.tar.gz
xrdp-proprietary-4f4a7a8c8ccaafa742b45bfc30c321b7b58d8e58.zip
Merge pull request #102 from bartw72/lock-on-add
Set lock when adding new displays to the chain
Diffstat (limited to 'sesman')
-rw-r--r--sesman/session.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sesman/session.c b/sesman/session.c
index 32b2e6be..665d1138 100644
--- a/sesman/session.c
+++ b/sesman/session.c
@@ -684,9 +684,15 @@ session_start_fork(int width, int height, int bpp, char *username,
temp->item->type = type;
temp->item->status = SESMAN_SESSION_STATUS_ACTIVE;
+ /*THREAD-FIX require chain lock */
+ lock_chain_acquire();
+
temp->next = g_sessions;
g_sessions = temp;
g_session_count++;
+
+ /*THREAD-FIX release chain lock */
+ lock_chain_release();
}
return display;