xfreerdp-server: Fixed deadlock issue in event queue.

Writing to the pipe may block if the pipe is full. Holding the mutex while writing prevents listeners from
aquiring the mutex and unblocking the write. This leads to a deadlock situation.
This commit is contained in:
Asbjørn Heid 2012-02-15 08:22:12 +01:00
parent 2719580501
commit 151182cbc8

View File

@ -96,9 +96,9 @@ void xf_event_push(xfEventQueue* event_queue, xfEvent* event)
event_queue->events[(event_queue->count)++] = event;
xf_set_event(event_queue);
pthread_mutex_unlock(&(event_queue->mutex));
xf_set_event(event_queue);
}
xfEvent* xf_event_peek(xfEventQueue* event_queue)