Merge pull request #102 from bartw72/lock-on-add

Set lock when adding new displays to the chain
This commit is contained in:
jsorg71 2014-04-17 22:07:50 -07:00
commit 4f4a7a8c8c

View File

@ -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;