summaryrefslogtreecommitdiff
path: root/dix/dixutils.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-11-16 14:36:55 -0500
committerAdam Jackson <ajax@nwnk.net>2018-11-19 19:37:10 +0000
commit8738ce85df535bdfdfecfce1c0d64e209cc6e508 (patch)
tree1758a02e75062cf3a3dd441db51046e5dcba596c /dix/dixutils.c
parent364d64981549544213e2bca8de6ff8a5b2b5a69e (diff)
dix: ensure work queues are cleared on reset
If the server resets, most client workqueues are cleaned up as the clients are killed. The one exception is the server's client, which is exempt from the killing spree. If that client has a queued work procedure active, it won't get cleared on reset. This commit ensures it gets cleared too.
Diffstat (limited to 'dix/dixutils.c')
-rw-r--r--dix/dixutils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 540023cbd..2983174a1 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -508,6 +508,19 @@ WorkQueuePtr workQueue;
static WorkQueuePtr *workQueueLast = &workQueue;
void
+ClearWorkQueue(void)
+{
+ WorkQueuePtr q, *p;
+
+ p = &workQueue;
+ while ((q = *p)) {
+ *p = q->next;
+ free(q);
+ }
+ workQueueLast = p;
+}
+
+void
ProcessWorkQueue(void)
{
WorkQueuePtr q, *p;