[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 56/98: auth: improve the auth_demuxer function
From: |
Samuel Thibault |
Subject: |
[hurd] 56/98: auth: improve the auth_demuxer function |
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 03e6f1fa6846dd860d0cd7babee62b8767cade30
Author: Justus Winter <address@hidden>
Date: Wed Dec 4 10:13:56 2013 +0100
auth: improve the auth_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.
* auth/auth.c (auth_demuxer): Improve the demuxer function.
---
auth/auth.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/auth/auth.c b/auth/auth.c
index 91a21e4..a395e79 100644
--- a/auth/auth.c
+++ b/auth/auth.c
@@ -468,10 +468,20 @@ S_auth_server_authenticate (struct authhandle *serverauth,
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);
- return (auth_server (inp, outp) ||
- ports_interrupt_server (inp, outp) ||
- ports_notify_server (inp, outp));
+ mig_routine_t auth_server_routine (mach_msg_header_t *);
+ mig_routine_t ports_notify_server_routine (mach_msg_header_t *);
+ mig_routine_t ports_interrupt_server_routine (mach_msg_header_t *);
+
+ mig_routine_t routine;
+ if ((routine = auth_server_routine (inp)) ||
+ (routine = ports_notify_server_routine (inp)) ||
+ (routine = ports_interrupt_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] 47/98: libfshelp: improve error handling in fshelp_start_translator_long, (continued)
- [hurd] 47/98: libfshelp: improve error handling in fshelp_start_translator_long, Samuel Thibault, 2014/01/13
- [hurd] 46/98: proc: store the device master port in _hurd_device_master, Samuel Thibault, 2014/01/13
- [hurd] 50/98: libnetfs: improve the netfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 31/98: fatfs: fix error handling in diskfs_get_directs, Samuel Thibault, 2014/01/13
- [hurd] 51/98: libtrivfs: improve the trivfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 24/98: Clean up the included header files, Samuel Thibault, 2014/01/13
- [hurd] 54/98: pfinet: improve the pfinet_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 52/98: exec: improve the exec_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 34/98: mach-defpager: drop all register qualifiers, Samuel Thibault, 2014/01/13
- [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 <=
- [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, 2014/01/13
- [hurd] 66/98: trans: improve the performance of dir_lookup in fakeroot, Samuel Thibault, 2014/01/13