dispatcher: write_safe: move EINTR debug message

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

Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Uri Lublin 2016-12-06 18:06:31 +02:00 committed by Frediano Ziglio
parent c3d5689f4a
commit 51d0ed6abb

View File

@ -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;