diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2000-12-03 05:06:15 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2000-12-03 05:06:15 +0000 |
commit | 126b3b56da3e106b5a044cf8b1c3f9930dd7fc48 (patch) | |
tree | 716d6f8065ff602a2fc326bf21996c3ae001c004 | |
parent | 296cf4310c18df7739d0a81fa742e3a3993e52c4 (diff) |
2000-12-03 Marcus Brinkmann <marcus@gnu.org>
* main.c (pfinet_demuxer): New variable PI.
Store port info in PI, and dereference it if found.
-rw-r--r-- | pfinet/ChangeLog | 5 | ||||
-rw-r--r-- | pfinet/main.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/pfinet/ChangeLog b/pfinet/ChangeLog index 5b83b213..a26dfefb 100644 --- a/pfinet/ChangeLog +++ b/pfinet/ChangeLog @@ -1,3 +1,8 @@ +2000-12-03 Marcus Brinkmann <marcus@gnu.org> + + * main.c (pfinet_demuxer): New variable PI. + Store port info in PI, and dereference it if found. + 2000-11-02 Marcus Brinkmann <marcus@gnu.org> * tunnel.c (trivfs_S_io_get_owner): Add return type to silence diff --git a/pfinet/main.c b/pfinet/main.c index f364e550..713eddc7 100644 --- a/pfinet/main.c +++ b/pfinet/main.c @@ -55,16 +55,24 @@ int pfinet_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp) { + struct port_info *pi; extern int io_server (mach_msg_header_t *, mach_msg_header_t *); extern int socket_server (mach_msg_header_t *, mach_msg_header_t *); extern int startup_notify_server (mach_msg_header_t *, mach_msg_header_t *); + /* We have several classes in one bucket, which need to be demuxed + differently. */ + pi = ports_lookup_port(pfinet_bucket, inp->msgh_local_port, socketport_class); - if (ports_lookup_port(pfinet_bucket, inp->msgh_local_port, socketport_class) != 0) + if (pi) + { + ports_port_deref (pi); + return (io_server (inp, outp) || socket_server (inp, outp) || trivfs_demuxer (inp, outp) || startup_notify_server (inp, outp)); + } else return (socket_server (inp, outp) || trivfs_demuxer (inp, outp) |