net/FakeSocket.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
New commits: commit 490646ba4c0c5cd2936583e96ba9c6aa0904f871 Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Sep 30 23:46:09 2019 +0300 Commit: Tor Lillqvist <[email protected]> CommitDate: Tue Oct 1 18:00:39 2019 +0300 Factor out the FakeSocketPair creation from fakeSocketSocket() Avoids misleading duplicate logging from fakeSocketPipe2(). Change-Id: Iaf0f2e621d25cbe869b7c5f3db0fbf36064f96cd Reviewed-on: https://gerrit.libreoffice.org/79901 Reviewed-by: Tor Lillqvist <[email protected]> Tested-by: Tor Lillqvist <[email protected]> (cherry picked from commit bd8b8f6fa8df2c8bd3bec15d3086ce6e2e44a212) diff --git a/net/FakeSocket.cpp b/net/FakeSocket.cpp index c31f6c0b8..1f0bbe780 100644 --- a/net/FakeSocket.cpp +++ b/net/FakeSocket.cpp @@ -102,7 +102,7 @@ void fakeSocketSetLoggingCallback(void (*callback)(const std::string&)) loggingCallback = callback; } -int fakeSocketSocket() +static int fakeSocketAllocate() { std::vector<FakeSocketPair>& fds = getFds(); @@ -119,14 +119,21 @@ int fakeSocketSocket() result.fd[0] = i*2; - FAKESOCKET_LOG("FakeSocket Create #" << i*2 << flush()); - return i*2; } +int fakeSocketSocket() +{ + const int result = fakeSocketAllocate(); + + FAKESOCKET_LOG("FakeSocket Create #" << result << flush()); + + return result; +} + int fakeSocketPipe2(int pipefd[2]) { - pipefd[0] = fakeSocketSocket(); + pipefd[0] = fakeSocketAllocate(); assert(pipefd[0] >= 0); std::vector<FakeSocketPair>& fds = getFds(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
