Blame SOURCES/0001-Correct-handling-of-EINTR-on-read-write.patch

69b15c
From df58bccfa5bfb42d7162f537c506a658729d4175 Mon Sep 17 00:00:00 2001
69b15c
From: Robbie Harwood <rharwood@redhat.com>
69b15c
Date: Mon, 28 Sep 2015 19:59:59 -0400
69b15c
Subject: [PATCH] Correct handling of EINTR on read()/write()
69b15c
69b15c
The common send/recv functions where zeroing the ret variable only
69b15c
once causing a loop if EINTR as actually ever set.
69b15c
69b15c
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
69b15c
Signed-off-by: Simo Sorce <simo@redhat.com>
69b15c
---
69b15c
 proxy/src/client/gpm_common.c | 4 ++--
69b15c
 1 file changed, 2 insertions(+), 2 deletions(-)
69b15c
69b15c
diff --git a/proxy/src/client/gpm_common.c b/proxy/src/client/gpm_common.c
69b15c
index f0d5e1104aa5f7198a382e2533c1347045bb9d95..6d626e8bc41e2f0e3294d2ebaf563155d18a528f 100644
69b15c
--- a/proxy/src/client/gpm_common.c
69b15c
+++ b/proxy/src/client/gpm_common.c
69b15c
@@ -160,8 +160,8 @@ static int gpm_send_buffer(struct gpm_ctx *gpmctx,
69b15c
 
69b15c
     retry = false;
69b15c
     do {
69b15c
-        ret = 0;
69b15c
         do {
69b15c
+            ret = 0;
69b15c
             wn = send(gpmctx->fd, &size, sizeof(uint32_t), MSG_NOSIGNAL);
69b15c
             if (wn == -1) {
69b15c
                 ret = errno;
69b15c
@@ -216,8 +216,8 @@ static int gpm_recv_buffer(struct gpm_ctx *gpmctx,
69b15c
     size_t pos;
69b15c
     int ret;
69b15c
 
69b15c
-    ret = 0;
69b15c
     do {
69b15c
+        ret = 0;
69b15c
         rn = read(gpmctx->fd, &size, sizeof(uint32_t));
69b15c
         if (rn == -1) {
69b15c
             ret = errno;
69b15c
-- 
69b15c
2.4.3
69b15c