[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 17/25: eth-multiplexer: improve the demuxer function
From: |
Samuel Thibault |
Subject: |
[hurd] 17/25: eth-multiplexer: improve the demuxer function |
Date: |
Tue, 27 May 2014 08:32:03 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit 60735c6c8b1382518db01ca7d416113b03bb837b
Author: Justus Winter <address@hidden>
Date: Fri Apr 11 22:53:29 2014 +0200
eth-multiplexer: improve the demuxer function
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need to call mig_reply_setup.
* eth-multiplexer/multiplexer.c (multiplexer_demuxer): Improve the
demuxer function. Prioritize the ethernet_demuxer.
---
eth-multiplexer/multiplexer.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/eth-multiplexer/multiplexer.c b/eth-multiplexer/multiplexer.c
index a133f45..cc0024e 100644
--- a/eth-multiplexer/multiplexer.c
+++ b/eth-multiplexer/multiplexer.c
@@ -79,12 +79,17 @@ static int
multiplexer_demuxer (mach_msg_header_t *inp,
mach_msg_header_t *outp)
{
- int device_server (mach_msg_header_t *, mach_msg_header_t *);
- int notify_server (mach_msg_header_t *, mach_msg_header_t *);
-
- return (device_server (inp, outp)
- || notify_server (inp, outp)
- || ethernet_demuxer (inp, outp));
+ mig_routine_t routine;
+ if ((routine = NULL, ethernet_demuxer (inp, outp)) ||
+ (routine = device_server_routine (inp)) ||
+ (routine = notify_server_routine (inp)))
+ {
+ if (routine)
+ (*routine) (inp, outp);
+ return TRUE;
+ }
+ else
+ return FALSE;
}
static void *
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch dde updated (deb7a47 -> 0d80a60), Samuel Thibault, 2014/05/27
- [hurd] 02/25: eth-filter: remove invalid port deallocation, Samuel Thibault, 2014/05/27
- [hurd] 09/25: libmachdev: fix function declaration, Samuel Thibault, 2014/05/27
- [hurd] 07/25: libmachdev: remove unused function, Samuel Thibault, 2014/05/27
- [hurd] 06/25: libmachdev: avoid doing pointer arithmetic to get the port_info, Samuel Thibault, 2014/05/27
- [hurd] 11/25: devnode: fix argp_program_version, remove argp_program_bug_address, Samuel Thibault, 2014/05/27
- [hurd] 18/25: libmachdev: fix device_open, Samuel Thibault, 2014/05/27
- [hurd] 12/25: eth-filter: fix argp_program_version, remove argp_program_bug_address, Samuel Thibault, 2014/05/27
- [hurd] 17/25: eth-multiplexer: improve the demuxer function,
Samuel Thibault <=
- [hurd] 19/25: libmachdev: remove mach_device_deallocate, Samuel Thibault, 2014/05/27
- [hurd] 20/25: libmachdev: make the two port buckets clearly distinct, Samuel Thibault, 2014/05/27
- [hurd] 21/25: libmachdev: drop unused declarations, Samuel Thibault, 2014/05/27
- [hurd] 14/25: devnode: improve the demuxer function, Samuel Thibault, 2014/05/27
- [hurd] 24/25: Merge remote-tracking branch 'incubator/dde' into dde-upstream, Samuel Thibault, 2014/05/27
- [hurd] 03/25: Drop DIST_FILES from Makefile, Samuel Thibault, 2014/05/27
- [hurd] 22/25: libmachdev: add missing includes, Samuel Thibault, 2014/05/27
- [hurd] 25/25: Merge branch 'dde-upstream' into dde, Samuel Thibault, 2014/05/27
- [hurd] 23/25: libmachdev: add, fix and use declaration for create_device_port, Samuel Thibault, 2014/05/27
- [hurd] 08/25: libmachdev: fix receiver lookups, Samuel Thibault, 2014/05/27