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
This commit is contained in:
Olivier Goffart 2016-02-10 15:38:21 +01:00
parent c98bf174ed
commit 893e22691d
3 changed files with 3 additions and 3 deletions

View File

@ -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();
}

View File

@ -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;
}

View File

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