[Pkg-owncloud-commits] [owncloud-client] 216/332: SocketAPI: Emit error of binding the server fails

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:01 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 1ae727e70f19fda1f4ab4c8d85595961ec80ff5e
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Thu Jul 17 15:01:01 2014 +0200

    SocketAPI: Emit error of binding the server fails
---
 src/mirall/socketapi.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/mirall/socketapi.cpp b/src/mirall/socketapi.cpp
index af5d6a4..6895258 100644
--- a/src/mirall/socketapi.cpp
+++ b/src/mirall/socketapi.cpp
@@ -46,6 +46,10 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype);
 
 }
 
+namespace {
+    const int PORT = 33001;
+}
+
 namespace Mirall {
 
 #define DEBUG qDebug() << "SocketApi: "
@@ -160,6 +164,10 @@ SocketApi::SocketApi(QObject* parent)
     , _localServer(new QTcpServer(this))
 {
     // setup socket
+    DEBUG << "Establishing SocketAPI server at" << PORT;
+    if (!_localServer->listen(QHostAddress::LocalHost, PORT)) {
+        DEBUG << "Failed to bind to port" << PORT;
+    }
     connect(_localServer, SIGNAL(newConnection()), this, SLOT(slotNewConnection()));
 
     // folder watcher

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