[Pkg-owncloud-commits] [owncloud-client] 27/470: ConnectionValidator: Make sure we intercept propfind error

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:24:40 UTC 2016


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 893e22691de2c2b4cc2f8a4fb3077f4ee974eb9c
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Feb 10 15:38:21 2016 +0100

    ConnectionValidator: Make sure we intercept propfind error
    
    If the PROPFIND return an invalid code (like 200) then we would
    not recieve the error signal and we would never sync again.
    
    Found while investigating https://github.com/owncloud/enterprise/issues/1068
---
 src/libsync/connectionvalidator.cpp | 2 +-
 src/libsync/networkjobs.cpp         | 2 +-
 src/libsync/networkjobs.h           | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/libsync/connectionvalidator.cpp b/src/libsync/connectionvalidator.cpp
index ca4e797..b57b4cf 100644
--- a/src/libsync/connectionvalidator.cpp
+++ b/src/libsync/connectionvalidator.cpp
@@ -173,7 +173,7 @@ void ConnectionValidator::checkAuthentication()
     job->setTimeout(timeoutToUseMsec);
     job->setProperties(QList<QByteArray>() << "getlastmodified");
     connect(job, SIGNAL(result(QVariantMap)), SLOT(slotAuthSuccess()));
-    connect(job, SIGNAL(networkError(QNetworkReply*)), SLOT(slotAuthFailed(QNetworkReply*)));
+    connect(job, SIGNAL(finishedWithError(QNetworkReply*)), SLOT(slotAuthFailed(QNetworkReply*)));
     job->start();
 }
 
diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp
index 5a51a4e..c4c3c35 100644
--- a/src/libsync/networkjobs.cpp
+++ b/src/libsync/networkjobs.cpp
@@ -558,7 +558,7 @@ bool PropfindJob::finished()
     } else {
         qDebug() << "PROPFIND request *not* successful, http result code is" << http_result_code
                  << (http_result_code == 302 ? reply()->header(QNetworkRequest::LocationHeader).toString()  : QLatin1String(""));
-        emit finishedWithError();
+        emit finishedWithError(reply());
     }
     return true;
 }
diff --git a/src/libsync/networkjobs.h b/src/libsync/networkjobs.h
index 62048d8..c2cc978 100644
--- a/src/libsync/networkjobs.h
+++ b/src/libsync/networkjobs.h
@@ -118,7 +118,7 @@ public:
 
 signals:
     void result(const QVariantMap &values);
-    void finishedWithError();
+    void finishedWithError(QNetworkReply *reply = 0);
 
 private slots:
     virtual bool finished() Q_DECL_OVERRIDE;

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