summaryrefslogtreecommitdiff
path: root/lwip/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'lwip/main.c')
-rw-r--r--lwip/main.c42
1 files changed, 11 insertions, 31 deletions
diff --git a/lwip/main.c b/lwip/main.c
index 9f7eb9b2..4dfbe143 100644
--- a/lwip/main.c
+++ b/lwip/main.c
@@ -99,6 +99,7 @@ int
lwip_demuxer (mach_msg_header_t * inp, mach_msg_header_t * outp)
{
struct port_info *pi;
+ mig_routine_t routine = NULL;
/* Clear errno to prevent raising previous errors again */
errno = 0;
@@ -116,40 +117,19 @@ lwip_demuxer (mach_msg_header_t * inp, mach_msg_header_t * outp)
if (pi)
{
ports_port_deref (pi);
-
- mig_routine_t routine;
- if ((routine = lwip_io_server_routine (inp)) ||
- (routine = lwip_socket_server_routine (inp)) ||
- (routine = lwip_pfinet_server_routine (inp)) ||
- (routine = lwip_iioctl_server_routine (inp)) ||
- (routine = NULL, trivfs_demuxer (inp, outp)) ||
- (routine = lwip_startup_notify_server_routine (inp)))
- {
- if (routine)
- (*routine) (inp, outp);
- return TRUE;
- }
- else
- return FALSE;
+ routine = lwip_io_server_routine (inp);
}
- else
+
+ if (routine || (routine = lwip_socket_server_routine (inp)) ||
+ (routine = lwip_pfinet_server_routine (inp)) ||
+ (routine = lwip_iioctl_server_routine (inp)) ||
+ (routine = lwip_startup_notify_server_routine (inp)))
{
- mig_routine_t routine;
- if ((routine = lwip_socket_server_routine (inp)) ||
- (routine = lwip_pfinet_server_routine (inp)) ||
- (routine = lwip_iioctl_server_routine (inp)) ||
- (routine = NULL, trivfs_demuxer (inp, outp)) ||
- (routine = lwip_startup_notify_server_routine (inp)))
- {
- if (routine)
- (*routine) (inp, outp);
- return TRUE;
- }
- else
- return FALSE;
+ (*routine) (inp, outp);
+ return TRUE;
}
-
- return 0;
+ else
+ return trivfs_demuxer (inp, outp);
}
void