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 committed by Anthony Tong
parent 967d14224e
commit 8139fdb392

View File

@ -86,9 +86,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)