From 7b3f0a473baca7a1894714b0afae513f3bdefb6e Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 24 Oct 1995 17:33:47 +0000 Subject: (ports_manage_port_operations_multithread/internal_demuxer): Don't attempt RPC if we can't get a valid port struct. --- libports/manage-multithread.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libports') 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++; -- cgit v1.2.3