diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-10-24 17:33:47 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-10-24 17:33:47 +0000 |
commit | 7b3f0a473baca7a1894714b0afae513f3bdefb6e (patch) | |
tree | 2f4b99687058008eb044c1d6a62a09076be31096 | |
parent | c95514dfc454161d9a0590c2a9c6a735c56bacc0 (diff) |
(ports_manage_port_operations_multithread/internal_demuxer): Don't
attempt RPC if we can't get a valid port struct.
-rw-r--r-- | libports/manage-multithread.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c index 7027f928..87a9d278 100644 --- a/libports/manage-multithread.c +++ b/libports/manage-multithread.c @@ -63,10 +63,15 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket, } pi = ports_lookup_port (bucket, inp->msgh_local_port, 0); - ports_begin_rpc (pi, &link); - status = demuxer (inp, outp); - ports_end_rpc (pi, &link); - ports_port_deref (pi); + if (pi) + { + ports_begin_rpc (pi, &link); + status = demuxer (inp, outp); + ports_end_rpc (pi, &link); + ports_port_deref (pi); + } + else + status = 0; spin_lock (&lock); nreqthreads++; |