[Pkg-owncloud-commits] [owncloud-client] 42/211: Fix small inefficiency in socketapi

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 76f5266fa149eca9f7d6f0432124e015f73fa15c
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Fri Oct 10 16:20:57 2014 +0200

    Fix small inefficiency in socketapi
---
 src/mirall/socketapi.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mirall/socketapi.cpp b/src/mirall/socketapi.cpp
index 87da013..a454c7a 100644
--- a/src/mirall/socketapi.cpp
+++ b/src/mirall/socketapi.cpp
@@ -439,11 +439,13 @@ void SocketApi::sendMessage(SocketType *socket, const QString& message, bool doW
     if( ! localMessage.endsWith(QLatin1Char('\n'))) {
         localMessage.append(QLatin1Char('\n'));
     }
-    qint64 sent = socket->write(localMessage.toUtf8());
+
+    QByteArray bytesToSend = localMessage.toUtf8();
+    qint64 sent = socket->write(bytesToSend);
     if( doWait ) {
         socket->waitForBytesWritten(1000);
     }
-    if( sent != localMessage.toUtf8().length() ) {
+    if( sent != bytesToSend.length() ) {
         qDebug() << "WARN: Could not send all data on socket for " << localMessage;
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list