[Pkg-owncloud-commits] [owncloud-client] 148/211: SocketAPI: send the change of the parent folder in the broatcast

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:39 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 a76fc0ee5ad8a2d605660c8b3ddde2afef979626
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Oct 21 15:26:51 2014 +0200

    SocketAPI: send the change of the parent folder in the broatcast
    
    Also do not compute the status if there is nno listeners
---
 src/mirall/socketapi.cpp | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/mirall/socketapi.cpp b/src/mirall/socketapi.cpp
index 7014db4..85ed123 100644
--- a/src/mirall/socketapi.cpp
+++ b/src/mirall/socketapi.cpp
@@ -244,6 +244,10 @@ void SocketApi::slotUnregisterPath( const QString& alias )
 
 void SocketApi::slotUpdateFolderView(const QString& alias)
 {
+    if (_listeners.isEmpty()) {
+        return;
+    }
+
     Folder *f = FolderMan::instance()->folder(alias);
     if (f) {
         // do only send UPDATE_VIEW for a couple of status
@@ -253,6 +257,10 @@ void SocketApi::slotUpdateFolderView(const QString& alias)
                 f->syncResult().status() == SyncResult::Problem ||
                 f->syncResult().status() == SyncResult::Error   ||
                 f->syncResult().status() == SyncResult::SetupError ) {
+
+            broadcastMessage(QLatin1String("STATUS"), f->path() ,
+                             this->fileStatus(f, "", _excludes).toSocketAPIString());
+
             broadcastMessage(QLatin1String("UPDATE_VIEW"), f->path() );
         } else {
             qDebug() << "Not sending UPDATE_VIEW for" << alias << "because status() is" << f->syncResult().status();
@@ -262,6 +270,10 @@ void SocketApi::slotUpdateFolderView(const QString& alias)
 
 void SocketApi::slotJobCompleted(const QString &folder, const SyncFileItem &item)
 {
+    if (_listeners.isEmpty()) {
+        return;
+    }
+
     Folder *f = FolderMan::instance()->folder(folder);
     if (!f) {
         return;
@@ -278,6 +290,10 @@ void SocketApi::slotJobCompleted(const QString &folder, const SyncFileItem &item
 
 void SocketApi::slotSyncItemDiscovered(const QString &folder, const SyncFileItem &item)
 {
+    if (_listeners.isEmpty()) {
+        return;
+    }
+
     if (item._instruction == CSYNC_INSTRUCTION_NONE) {
         return;
     }

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