[Pkg-owncloud-commits] [owncloud-client] 41/211: Use local socket (named pipe) connection also on Windows

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 3ebe3b11965eab331a1e3ba61174657f5eb39f84
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Fri Oct 10 15:54:32 2014 +0200

    Use local socket (named pipe) connection also on Windows
---
 src/mirall/socketapi.cpp | 16 ----------------
 src/mirall/socketapi.h   | 12 ------------
 2 files changed, 28 deletions(-)

diff --git a/src/mirall/socketapi.cpp b/src/mirall/socketapi.cpp
index 62ff255..87da013 100644
--- a/src/mirall/socketapi.cpp
+++ b/src/mirall/socketapi.cpp
@@ -60,10 +60,6 @@ CSYNC_EXCLUDE_TYPE csync_excluded_no_ctx(c_strlist_t *excludes, const char *path
 int csync_exclude_load(const char *fname, c_strlist_t **list);
 }
 
-namespace {
-    const int PORT = 34001;
-}
-
 namespace Mirall {
 
 #define DEBUG qDebug() << "SocketApi: "
@@ -225,17 +221,6 @@ SocketApi::SocketApi(QObject* parent)
     : QObject(parent)
     , _excludes(0)
 {
-
-    qDebug() << "Hello";
-    qWarning() << "gello";
-
-#ifdef SOCKETAPI_TCP
-    // setup socket
-    DEBUG << "Establishing SocketAPI server at" << PORT;
-    if (!_localServer.listen(QHostAddress::LocalHost, PORT)) {
-        DEBUG << "Failed to bind to port" << PORT;
-    }
-#else
     QString socketPath;
 
     if (Utility::isWindows()) {
@@ -277,7 +262,6 @@ SocketApi::SocketApi(QObject* parent)
         DEBUG << "server started, listening at " << socketPath;
     }
 
-#endif
     connect(&_localServer, SIGNAL(newConnection()), this, SLOT(slotNewConnection()));
 
     // folder watcher
diff --git a/src/mirall/socketapi.h b/src/mirall/socketapi.h
index 4ea4a9a..039f4cc 100644
--- a/src/mirall/socketapi.h
+++ b/src/mirall/socketapi.h
@@ -33,19 +33,7 @@ class QStringList;
 
 namespace Mirall {
 
-//Define this to use the old school TCP API. Maybe we should offer both APIs
-// and have the old TCP one be enableable via command line switch?
-//#define SOCKETAPI_TCP
-#if defined(Q_OS_WIN)
-// Windows plugin has not been ported
-#define SOCKETAPI_TCP
-#endif
-
-#ifdef SOCKETAPI_TCP
-typedef QTcpSocket SocketType;
-#else
 typedef QLocalSocket SocketType;
-#endif
 
 class SocketApi : public QObject
 {

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