[Spice-devel] [spice PATCH v2 6/6] dispatcher: write_safe: move EINTR debug message

Uri Lublin uril at redhat.com
Tue Dec 6 16:06:31 UTC 2016


spice_debug was called for not-EINTR case, move
it to the right place.

Signed-off-by: Uri Lublin <uril at redhat.com>
---
 server/dispatcher.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/dispatcher.c b/server/dispatcher.c
index f0479aa..f4fe97b 100644
--- a/server/dispatcher.c
+++ b/server/dispatcher.c
@@ -254,9 +254,9 @@ static int write_safe(int fd, uint8_t *buf, size_t size)
         ret = write(fd, buf + written_size, size - written_size);
         if (ret == -1) {
             if (errno != EINTR) {
-                spice_debug("EINTR in write");
                 return -1;
             }
+            spice_debug("EINTR in write");
             continue;
         }
         written_size += ret;
-- 
2.9.3



More information about the Spice-devel mailing list