summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-10-07 18:13:27 +0000
committerMiles Bader <miles@gnu.org>1996-10-07 18:13:27 +0000
commit2b35b0ded59bf47b92d2b9ad5f92df9779975ed7 (patch)
treeef5f8e97d84cff316dd9269983202b3b7f8b0070
parentea155cab3f8ee65d7c2b5424e2353137ffaeeff1 (diff)
(connq_listen):
Unlock CQ->lock when returning EWOULDBLOCK.
-rw-r--r--pflocal/connq.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pflocal/connq.c b/pflocal/connq.c
index 5efeb5d2..862c9a14 100644
--- a/pflocal/connq.c
+++ b/pflocal/connq.c
@@ -1,6 +1,6 @@
/* Listen queue functions
- Copyright (C) 1995 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -124,7 +124,10 @@ connq_listen (struct connq *cq, int noblock,
mutex_lock (&cq->lock);
if (noblock && cq->head == cq->tail)
- return EWOULDBLOCK;
+ {
+ mutex_unlock (&cq->lock);
+ return EWOULDBLOCK;
+ }
cq->num_listeners++;