Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] Fix packet discards HTTP redirect.
@ 2015-07-08  7:32 wenzong.fan
  2015-07-08 14:12 ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: wenzong.fan @ 2015-07-08  7:32 UTC (permalink / raw)
  To: openembedded-core

From: Li Wang <li.wang@windriver.com>

Disconnect the connection by poll() timeout.
If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
apr_socket_recv() returns EAGAIN.

Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
Signed-off-by: Li Wang <li.wang@windriver.com>
---
 .../apr/Fix-packet-discards-HTTP-redirect.patch    | 32 ++++++++++++++++++++++
 meta/recipes-support/apr/apr_1.5.2.bb              |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch

diff --git a/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch b/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
new file mode 100644
index 0000000..6805b8b
--- /dev/null
+++ b/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
@@ -0,0 +1,32 @@
+Fix packet discards HTTP redirect.
+
+Disconnect the connection by poll() timeout.
+If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
+apr_socket_recv() returns EAGAIN.
+
+Upstream-Status: Pending
+
+Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
+Signed-off-by: Li Wang <li.wang@windriver.com>
+---
+ network_io/unix/sendrecv.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
+index c133a26..e8faf15 100644
+--- a/network_io/unix/sendrecv.c
++++ b/network_io/unix/sendrecv.c
+@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
+                       && (sock->timeout > 0)) {
+ do_select:
+         arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
++        if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
++            *len = 0;
++            return EAGAIN;
++        }
+         if (arv != APR_SUCCESS) {
+             *len = 0;
+             return arv;
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-support/apr/apr_1.5.2.bb b/meta/recipes-support/apr/apr_1.5.2.bb
index aac6276..c1f7f38 100644
--- a/meta/recipes-support/apr/apr_1.5.2.bb
+++ b/meta/recipes-support/apr/apr_1.5.2.bb
@@ -15,6 +15,7 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
            file://configfix.patch \
            file://run-ptest \
            file://upgrade-and-fix-1.5.1.patch \
+           file://Fix-packet-discards-HTTP-redirect.patch \
 "
 
 SRC_URI[md5sum] = "4e9769f3349fe11fc0a5e1b224c236aa"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix packet discards HTTP redirect.
  2015-07-08  7:32 [PATCH] Fix packet discards HTTP redirect wenzong.fan
@ 2015-07-08 14:12 ` Burton, Ross
  2015-07-09  1:43   ` wenzong fan
  0 siblings, 1 reply; 3+ messages in thread
From: Burton, Ross @ 2015-07-08 14:12 UTC (permalink / raw)
  To: wenzong fan; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 3027 bytes --]

As per our commit guidelines, the commit message needs to start with the
name of the recipe that was modified.

Ross

On 8 July 2015 at 08:32, <wenzong.fan@windriver.com> wrote:

> From: Li Wang <li.wang@windriver.com>
>
> Disconnect the connection by poll() timeout.
> If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
> apr_socket_recv() returns EAGAIN.
>
> Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
> Signed-off-by: Li Wang <li.wang@windriver.com>
> ---
>  .../apr/Fix-packet-discards-HTTP-redirect.patch    | 32
> ++++++++++++++++++++++
>  meta/recipes-support/apr/apr_1.5.2.bb              |  1 +
>  2 files changed, 33 insertions(+)
>  create mode 100644
> meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
>
> diff --git
> a/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
> b/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
> new file mode 100644
> index 0000000..6805b8b
> --- /dev/null
> +++ b/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
> @@ -0,0 +1,32 @@
> +Fix packet discards HTTP redirect.
> +
> +Disconnect the connection by poll() timeout.
> +If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
> +apr_socket_recv() returns EAGAIN.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
> +Signed-off-by: Li Wang <li.wang@windriver.com>
> +---
> + network_io/unix/sendrecv.c |    4 ++++
> + 1 file changed, 4 insertions(+)
> +
> +diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
> +index c133a26..e8faf15 100644
> +--- a/network_io/unix/sendrecv.c
> ++++ b/network_io/unix/sendrecv.c
> +@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char
> *buf, apr_size_t *len)
> +                       && (sock->timeout > 0)) {
> + do_select:
> +         arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
> ++        if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
> ++            *len = 0;
> ++            return EAGAIN;
> ++        }
> +         if (arv != APR_SUCCESS) {
> +             *len = 0;
> +             return arv;
> +--
> +1.7.9.5
> +
> diff --git a/meta/recipes-support/apr/apr_1.5.2.bb
> b/meta/recipes-support/apr/apr_1.5.2.bb
> index aac6276..c1f7f38 100644
> --- a/meta/recipes-support/apr/apr_1.5.2.bb
> +++ b/meta/recipes-support/apr/apr_1.5.2.bb
> @@ -15,6 +15,7 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
>             file://configfix.patch \
>             file://run-ptest \
>             file://upgrade-and-fix-1.5.1.patch \
> +           file://Fix-packet-discards-HTTP-redirect.patch \
>  "
>
>  SRC_URI[md5sum] = "4e9769f3349fe11fc0a5e1b224c236aa"
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 4449 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix packet discards HTTP redirect.
  2015-07-08 14:12 ` Burton, Ross
@ 2015-07-09  1:43   ` wenzong fan
  0 siblings, 0 replies; 3+ messages in thread
From: wenzong fan @ 2015-07-09  1:43 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 07/08/2015 10:12 PM, Burton, Ross wrote:
> As per our commit guidelines, the commit message needs to start with the
> name of the recipe that was modified.

Fixed it, please refer to: [OE-core] [PATCH v2] apr: Fix packet discards 
HTTP redirect

Thanks
Wenzong

>
> Ross
>
> On 8 July 2015 at 08:32, <wenzong.fan@windriver.com
> <mailto:wenzong.fan@windriver.com>> wrote:
>
>     From: Li Wang <li.wang@windriver.com <mailto:li.wang@windriver.com>>
>
>     Disconnect the connection by poll() timeout.
>     If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
>     apr_socket_recv() returns EAGAIN.
>
>     Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp
>     <mailto:yoshitane.nrs@cnt.ncos.nec.co.jp>>
>     Signed-off-by: Li Wang <li.wang@windriver.com
>     <mailto:li.wang@windriver.com>>
>     ---
>       .../apr/Fix-packet-discards-HTTP-redirect.patch    | 32
>     ++++++++++++++++++++++
>       meta/recipes-support/apr/apr_1.5.2.bb <http://apr_1.5.2.bb>
>            |  1 +
>       2 files changed, 33 insertions(+)
>       create mode 100644
>     meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
>
>     diff --git
>     a/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
>     b/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
>     new file mode 100644
>     index 0000000..6805b8b
>     --- /dev/null
>     +++
>     b/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
>     @@ -0,0 +1,32 @@
>     +Fix packet discards HTTP redirect.
>     +
>     +Disconnect the connection by poll() timeout.
>     +If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
>     +apr_socket_recv() returns EAGAIN.
>     +
>     +Upstream-Status: Pending
>     +
>     +Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp
>     <mailto:yoshitane.nrs@cnt.ncos.nec.co.jp>>
>     +Signed-off-by: Li Wang <li.wang@windriver.com
>     <mailto:li.wang@windriver.com>>
>     +---
>     + network_io/unix/sendrecv.c |    4 ++++
>     + 1 file changed, 4 insertions(+)
>     +
>     +diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
>     +index c133a26..e8faf15 100644
>     +--- a/network_io/unix/sendrecv.c
>     ++++ b/network_io/unix/sendrecv.c
>     +@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock,
>     char *buf, apr_size_t *len)
>     +                       && (sock->timeout > 0)) {
>     + do_select:
>     +         arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
>     ++        if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
>     ++            *len = 0;
>     ++            return EAGAIN;
>     ++        }
>     +         if (arv != APR_SUCCESS) {
>     +             *len = 0;
>     +             return arv;
>     +--
>     +1.7.9.5
>     +
>     diff --git a/meta/recipes-support/apr/apr_1.5.2.bb
>     <http://apr_1.5.2.bb> b/meta/recipes-support/apr/apr_1.5.2.bb
>     <http://apr_1.5.2.bb>
>     index aac6276..c1f7f38 100644
>     --- a/meta/recipes-support/apr/apr_1.5.2.bb <http://apr_1.5.2.bb>
>     +++ b/meta/recipes-support/apr/apr_1.5.2.bb <http://apr_1.5.2.bb>
>     @@ -15,6 +15,7 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
>                  file://configfix.patch \
>                  file://run-ptest \
>                  file://upgrade-and-fix-1.5.1.patch \
>     +           file://Fix-packet-discards-HTTP-redirect.patch \
>       "
>
>       SRC_URI[md5sum] = "4e9769f3349fe11fc0a5e1b224c236aa"
>     --
>     1.9.1
>
>     --
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-09  1:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08  7:32 [PATCH] Fix packet discards HTTP redirect wenzong.fan
2015-07-08 14:12 ` Burton, Ross
2015-07-09  1:43   ` wenzong fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox