diff options
Diffstat (limited to 'libports')
-rw-r--r-- | libports/manage-multithread.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c index 26afa79a..9843b9c0 100644 --- a/libports/manage-multithread.c +++ b/libports/manage-multithread.c @@ -76,13 +76,18 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket, if (pi) { ports_begin_rpc (pi, &link); + mutex_lock (&_ports_lock); if (inp->msgh_seqno < pi->cancel_threshhold) { cancel_rpc (inp, outp); status = 1; + mutex_unlock (&_ports_lock); } else - status = demuxer (inp, outp); + { + mutex_unlock (&_ports_lock); + status = demuxer (inp, outp); + } ports_end_rpc (pi, &link); ports_port_deref (pi); } |