Set lock when adding new displays to the chain
This commit is contained in:
parent
7d82cbf741
commit
6318d8ef0f
@ -669,9 +669,15 @@ session_start_fork(int width, int height, int bpp, char *username,
|
|||||||
temp->item->type = type;
|
temp->item->type = type;
|
||||||
temp->item->status = SESMAN_SESSION_STATUS_ACTIVE;
|
temp->item->status = SESMAN_SESSION_STATUS_ACTIVE;
|
||||||
|
|
||||||
|
/*THREAD-FIX require chain lock */
|
||||||
|
lock_chain_acquire();
|
||||||
|
|
||||||
temp->next = g_sessions;
|
temp->next = g_sessions;
|
||||||
g_sessions = temp;
|
g_sessions = temp;
|
||||||
g_session_count++;
|
g_session_count++;
|
||||||
|
|
||||||
|
/*THREAD-FIX release chain lock */
|
||||||
|
lock_chain_release();
|
||||||
}
|
}
|
||||||
|
|
||||||
return display;
|
return display;
|
||||||
|
Loading…
Reference in New Issue
Block a user