~ubuntu-branches/ubuntu/trusty/serf/trusty-security

« back to all changes in this revision

Viewing changes to debian/patches/kqueue

  • Committer: Bazaar Package Importer
  • Author(s): Peter Samuelson
  • Date: 2011-06-27 18:09:28 UTC
  • mfrom: (1.2.5 upstream)
  • mto: (3.3.1 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20110627180928-ybwzd3hmx82nu3ir
Tags: 1.0.0~0+svn1514-1
* New upstream snapshot.
  - patches/abi-0.x: Remove as obsolete.
  - patches/kqueue: Forward-port.
  - Bump ABI: libserf0.7{,-dbg} -> libserf1{,-dbg}
  - patches/ip6-localhost: New patch: temporary (I hope) workaround for
    IPv4 / IPv6 confusion in testsuite.
* Implement Multi-Arch: same.
* libserf-dev Conflicts: libserf-0-0-dev, not Breaks.  Thanks, lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
are not true with the FreeBSD kernel.
6
6
 
7
7
 
8
 
--- a/test/test_util.c
9
 
+++ b/test/test_util.c
10
 
@@ -168,6 +168,7 @@
 
8
--- a/test/server/test_server.c
 
9
+++ b/test/server/test_server.c
 
10
@@ -217,6 +217,7 @@ apr_status_t test_server_run(serv_ctx_t 
11
11
     apr_pollset_t *pollset;
12
12
     apr_int32_t num;
13
13
     const apr_pollfd_t *desc;
15
15
 
16
16
     /* create a new pollset */
17
17
     status = apr_pollset_create(&pollset, 32, pool, 0);
18
 
@@ -211,7 +212,14 @@
 
18
@@ -260,7 +261,14 @@ apr_status_t test_server_run(serv_ctx_t 
19
19
             goto cleanup;
20
20
         }
21
21
 
22
 
-        if (desc->desc.s == tb->client_sock) {
23
 
+        if (desc->desc.s == tb->client_sock && !client_sock_handled) {
 
22
-        if (desc->desc.s == servctx->client_sock) {
 
23
+        if (desc->desc.s == servctx->client_sock && !client_sock_handled) {
24
24
+            /* Note: on some implementations (for example with kqueue),
25
25
+               apr_pollset_poll() returns separate events for APR_POLLIN
26
 
+               and APR_POLLOUT. client_sock_handled filters the second 
 
26
+               and APR_POLLOUT. client_sock_handled filters the second
27
27
+               event.
28
28
+            */
29
29
+            client_sock_handled = 1;
30
30
+
31
31
             /* Replay data to socket. */
32
 
             status = replay(tb, pool);
 
32
             status = replay(servctx, desc->rtnevents, pool);
33
33