diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2017-11-21 16:54:26 +0000 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2017-11-23 11:39:01 +0000 |
commit | 4e88aa983ed60d7a7c84124814d4d03558e12b57 (patch) | |
tree | cc773c0783d2d6152d3ff623b39e017781cdf751 | |
parent | d4c83cd2c70b0460bdb2800031fed719fd995595 (diff) |
Revert ::write_all change
-rw-r--r-- | src/spice-streaming-agent.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp index 9eabb68..bc50256 100644 --- a/src/spice-streaming-agent.cpp +++ b/src/spice-streaming-agent.cpp @@ -52,6 +52,8 @@ struct SpiceStreamDataMessage StreamMsgData msg; }; +static size_t write_all(int fd, const void *buf, const size_t len); + class SpiceStream { public: @@ -76,7 +78,9 @@ public: std::function<void(uint32_t *)> fill_cursor); private: - size_t write_all(const void *buf, const size_t len); + size_t write_all(const void *buf, const size_t len) { + return ::write_all(streamfd, buf, len); + } SpiceStream(const SpiceStream &) = delete; SpiceStream &operator=(const SpiceStream &) = delete; @@ -201,11 +205,12 @@ int SpiceStream::read_command(bool blocking) return n; } -size_t SpiceStream::write_all(const void *buf, const size_t len) +static size_t +write_all(int fd, const void *buf, const size_t len) { size_t written = 0; while (written < len) { - int l = write(streamfd, (const char *) buf + written, len - written); + int l = write(fd, (const char *) buf + written, len - written); if (l < 0 && errno == EINTR) { continue; } |