summaryrefslogtreecommitdiff
path: root/pflocal
diff options
context:
space:
mode:
Diffstat (limited to 'pflocal')
-rw-r--r--pflocal/pflocal.c14
-rw-r--r--pflocal/sserver.c25
2 files changed, 29 insertions, 10 deletions
diff --git a/pflocal/pflocal.c b/pflocal/pflocal.c
index 7a4e8d91..d51f721e 100644
--- a/pflocal/pflocal.c
+++ b/pflocal/pflocal.c
@@ -51,8 +51,18 @@ int trivfs_cntl_nportclasses = 1;
static int
pf_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp)
{
- extern int socket_server (mach_msg_header_t *inp, mach_msg_header_t *outp);
- return socket_server (inp, outp) || trivfs_demuxer (inp, outp);
+ mig_routine_t socket_server_routine (mach_msg_header_t *);
+
+ mig_routine_t routine;
+ if ((routine = socket_server_routine (inp)) ||
+ (routine = NULL, trivfs_demuxer (inp, outp)))
+ {
+ if (routine)
+ (*routine) (inp, outp);
+ return TRUE;
+ }
+ else
+ return FALSE;
}
diff --git a/pflocal/sserver.c b/pflocal/sserver.c
index 9de0aa54..4ce26b13 100644
--- a/pflocal/sserver.c
+++ b/pflocal/sserver.c
@@ -1,6 +1,6 @@
/* Server for socket ops
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2013 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -36,13 +36,22 @@ static pthread_spinlock_t sock_server_active_lock = PTHREAD_SPINLOCK_INITIALIZER
static int
sock_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp)
{
- extern int socket_server (mach_msg_header_t *inp, mach_msg_header_t *outp);
- extern int io_server (mach_msg_header_t *inp, mach_msg_header_t *outp);
- return
- socket_server (inp, outp)
- || io_server (inp, outp)
- || ports_interrupt_server (inp, outp)
- || ports_notify_server (inp, outp);
+ mig_routine_t io_server_routine (mach_msg_header_t *);
+ mig_routine_t socket_server_routine (mach_msg_header_t *);
+ mig_routine_t ports_interrupt_server_routine (mach_msg_header_t *);
+ mig_routine_t ports_notify_server_routine (mach_msg_header_t *);
+
+ mig_routine_t routine;
+ if ((routine = io_server_routine (inp)) ||
+ (routine = socket_server_routine (inp)) ||
+ (routine = ports_interrupt_server_routine (inp)) ||
+ (routine = ports_notify_server_routine (inp)))
+ {
+ (*routine) (inp, outp);
+ return TRUE;
+ }
+ else
+ return FALSE;
}
/* Handle socket requests while there are sockets around. */