[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 57/98: utils: improve the auth_demuxer function in fakeauth.c
From: |
Samuel Thibault |
Subject: |
[hurd] 57/98: utils: improve the auth_demuxer function in fakeauth.c |
Date: |
Tue, 14 Jan 2014 02:00:02 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit cc2464c4969f232ed6efb305adfdb69b2176ff34
Author: Justus Winter <address@hidden>
Date: Wed Dec 4 10:21:41 2013 +0100
utils: improve the auth_demuxer function in fakeauth.c
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.
* utils/fakeauth.c (auth_demuxer): Improve the demuxer function.
---
utils/fakeauth.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/utils/fakeauth.c b/utils/fakeauth.c
index 154bf8e..2c72c89 100644
--- a/utils/fakeauth.c
+++ b/utils/fakeauth.c
@@ -302,11 +302,20 @@ S_interrupt_operation (mach_port_t port,
mach_port_seqno_t seqno)
static int
auth_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp)
{
- extern int auth_server (mach_msg_header_t *inp, mach_msg_header_t *outp);
- extern int interrupt_server (mach_msg_header_t *inp, mach_msg_header_t *);
- return (auth_server (inp, outp) ||
- interrupt_server (inp, outp) ||
- ports_notify_server (inp, outp));
+ mig_routine_t auth_server_routine (mach_msg_header_t *);
+ mig_routine_t interrupt_server_routine (mach_msg_header_t *);
+ mig_routine_t ports_notify_server_routine (mach_msg_header_t *);
+
+ mig_routine_t routine;
+ if ((routine = auth_server_routine (inp)) ||
+ (routine = interrupt_server_routine (inp)) ||
+ (routine = ports_notify_server_routine (inp)))
+ {
+ (*routine) (inp, outp);
+ return TRUE;
+ }
+ else
+ return FALSE;
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 49/98: libdiskfs: improve the diskfs_demuxer function, (continued)
- [hurd] 49/98: libdiskfs: improve the diskfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 56/98: auth: improve the auth_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 12/98: mach-defpager: remove unused variables, Samuel Thibault, 2014/01/13
- [hurd] 45/98: proc: store the privileged host port in _hurd_host_priv, Samuel Thibault, 2014/01/13
- [hurd] 36/98: libports: fix right leaks when adjusting priorities, Samuel Thibault, 2014/01/13
- [hurd] 65/98: trans: fix the use of the hash table in fakeroot.c, Samuel Thibault, 2014/01/13
- [hurd] 37/98: libshouldbeinlibc: fix minor port leak in maptime_map, Samuel Thibault, 2014/01/13
- [hurd] 38/98: init: fix port leak, Samuel Thibault, 2014/01/13
- [hurd] 68/98: trans: fix locking issue in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 55/98: pflocal: improve the demuxer functions, Samuel Thibault, 2014/01/13
- [hurd] 57/98: utils: improve the auth_demuxer function in fakeauth.c,
Samuel Thibault <=
- [hurd] 66/98: trans: improve the performance of dir_lookup in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 41/98: libports: improve error handling in ports_reallocate_from_external, Samuel Thibault, 2014/01/13
- [hurd] 40/98: libports: improve error handling in ports_reallocate_port, Samuel Thibault, 2014/01/13
- [hurd] 58/98: trans: remove unused declaration from fakeroot.c, Samuel Thibault, 2014/01/13
- [hurd] 72/98: trans: fix reference counting bug in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 39/98: proc: update comments, Samuel Thibault, 2014/01/13
- [hurd] 26/98: Make sure created netfs nodes have stat validated, Samuel Thibault, 2014/01/13
- [hurd] 53/98: proc: improve the message_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 04/98: utils: implement settrans --pid-file, Samuel Thibault, 2014/01/13
- [hurd] 59/98: trans: improve the netfs_demuxer function in fakeroot.c, Samuel Thibault, 2014/01/13