summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-10-29 15:47:58 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-10-29 15:47:58 +0100
commit0934e06b4a72e3358a0c2788feb524c7c49bc97b (patch)
tree73b1c66c381ee71b120de837d99b596c49bd7337
parent3685b37ca7ef2d62b8a24008e127e721f8592d21 (diff)
add patch series
-rw-r--r--debian/patches/fixes0001-trans-improve-demuxers.patch79
-rw-r--r--debian/patches/series1
2 files changed, 80 insertions, 0 deletions
diff --git a/debian/patches/fixes0001-trans-improve-demuxers.patch b/debian/patches/fixes0001-trans-improve-demuxers.patch
new file mode 100644
index 00000000..13e37d31
--- /dev/null
+++ b/debian/patches/fixes0001-trans-improve-demuxers.patch
@@ -0,0 +1,79 @@
+From 0437af60d3bbf09003f3fd1fdb9993958fcd430d Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Thu, 29 Oct 2015 15:43:28 +0100
+Subject: [PATCH hurd] trans: improve demuxers
+
+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.
+
+* trans/proxy-defpager.c (proxy_defpager_demuxer): Improve the demuxer
+function.
+* trans/streamio.c (demuxer): Likewise.
+---
+ trans/proxy-defpager.c | 14 ++++++++++----
+ trans/streamio.c | 15 +++++++++++----
+ 2 files changed, 21 insertions(+), 8 deletions(-)
+
+diff --git a/trans/proxy-defpager.c b/trans/proxy-defpager.c
+index 662f269..4fdeb35 100644
+--- a/trans/proxy-defpager.c
++++ b/trans/proxy-defpager.c
+@@ -236,10 +236,16 @@ int
+ proxy_defpager_demuxer (mach_msg_header_t *inp,
+ mach_msg_header_t *outp)
+ {
+- extern int default_pager_server (mach_msg_header_t *, mach_msg_header_t *);
+-
+- return default_pager_server (inp, outp)
+- || trivfs_demuxer (inp, outp);
++ mig_routine_t routine;
++ if ((routine = default_pager_server_routine (inp)) ||
++ (routine = NULL, trivfs_demuxer (inp, outp)))
++ {
++ if (routine)
++ (*routine) (inp, outp);
++ return TRUE;
++ }
++ else
++ return FALSE;
+ }
+
+ int
+diff --git a/trans/streamio.c b/trans/streamio.c
+index 54627b7..507250b 100644
+--- a/trans/streamio.c
++++ b/trans/streamio.c
+@@ -36,6 +36,7 @@
+
+ #include "libtrivfs/trivfs_fs_S.h"
+ #include "libtrivfs/trivfs_io_S.h"
++#include "device_reply_S.h"
+
+ /* The global lock */
+ pthread_mutex_t global_lock;
+@@ -273,10 +274,16 @@ static const struct argp argp = { options, parse_opt, args_doc, doc };
+ int
+ demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp)
+ {
+- extern int device_reply_server (mach_msg_header_t *, mach_msg_header_t *);
+-
+- return (trivfs_demuxer (inp, outp)
+- || device_reply_server (inp, outp));
++ mig_routine_t routine;
++ if ((routine = NULL, trivfs_demuxer (inp, outp)) ||
++ (routine = device_reply_server_routine (inp)))
++ {
++ if (routine)
++ (*routine) (inp, outp);
++ return TRUE;
++ }
++ else
++ return FALSE;
+ }
+
+ int
+--
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 68dfa6ca..6b17ac87 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -75,3 +75,4 @@ introspection0009-fixup_libports.patch
introspection0010-fixup_libintrospection.patch
introspection0011-fixup_libintrospection.patch
introspection0012-fixup_libintrospection.patch
+fixes0001-trans-improve-demuxers.patch