diff options
author | Bart Warmerdam <Bart.Warmerdam@mail.ing.nl> | 2013-12-16 13:52:50 +0100 |
---|---|---|
committer | Bart Warmerdam <Bart.Warmerdam@mail.ing.nl> | 2013-12-16 13:52:50 +0100 |
commit | 6318d8ef0f3ab2ab5975f3a26fa39aa534bb0bf2 (patch) | |
tree | 55f4e116d1b694d70886ed805f2bf9a30e5caa27 /sesman | |
parent | 7d82cbf741f6efe60ab5aa6bb8c9931795ba7c46 (diff) | |
download | xrdp-proprietary-6318d8ef0f3ab2ab5975f3a26fa39aa534bb0bf2.tar.gz xrdp-proprietary-6318d8ef0f3ab2ab5975f3a26fa39aa534bb0bf2.zip |
Set lock when adding new displays to the chain
Diffstat (limited to 'sesman')
-rw-r--r-- | sesman/session.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sesman/session.c b/sesman/session.c index 888604da..eec36dfe 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -669,9 +669,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; |