[Pkg-owncloud-commits] [owncloud-client] 74/89: Fix: Allow to retry sync also for fatal err conditions.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Dec 14 01:02:39 UTC 2013


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 09745c7f75f8c52287cc21058f5fcc496693c49c
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Thu Dec 12 11:38:41 2013 +0100

    Fix: Allow to retry sync also for fatal err conditions.
    
    Otherwise there would not  have been a chance to resync for example data
    that was Forbidden because of a read only share.
    
    Also removed some commented code.
---
 src/mirall/accountsettings.cpp    | 38 --------------------------------------
 src/mirall/owncloudpropagator.cpp |  2 +-
 src/mirall/syncjournaldb.cpp      |  4 ++--
 3 files changed, 3 insertions(+), 41 deletions(-)

diff --git a/src/mirall/accountsettings.cpp b/src/mirall/accountsettings.cpp
index eb966f7..b0cf256 100644
--- a/src/mirall/accountsettings.cpp
+++ b/src/mirall/accountsettings.cpp
@@ -491,44 +491,6 @@ void AccountSettings::slotUpdateFolderState( Folder *folder )
     }
 }
 
-//void AccountSettings::slotOCInfo( const QString& url, const QString& versionStr, const QString& version, const QString& )
-//{
-//#ifdef Q_OS_WIN
-//        // work around a bug in QDesktopServices on Win32, see i-net
-//        QString filePath = url;
-
-//        if (filePath.startsWith("\\\\") || filePath.startsWith("//"))
-//            _OCUrl.setUrl(QDir::toNativeSeparators(filePath));
-//        else
-//            _OCUrl = QUrl::fromLocalFile(filePath);
-//#else
-//    _OCUrl = QUrl::fromLocalFile(url);
-//#endif
-
-//    qDebug() << "#-------# oC found on " << url;
-//    /* enable the open button */
-//    ui->connectLabel->setOpenExternalLinks(true);
-//    QUrl safeUrl(url);
-//    safeUrl.setPassword(QString()); // Remove the password from the URL to avoid showing it in the UI
-//    showConnectionLabel( tr("Connected to <a href=\"%1\">%2</a>.").arg(url, safeUrl.toString()),
-//                         tr("Version: %1 (%2)").arg(versionStr).arg(version) );
-//    ui->_buttonAdd->setEnabled(true);
-
-//    disconnect(ownCloudInfo::instance(), SIGNAL(ownCloudInfoFound(const QString&, const QString&, const QString&, const QString&)),
-//            this, SLOT(slotOCInfo( const QString&, const QString&, const QString&, const QString& )));
-//    disconnect(ownCloudInfo::instance(), SIGNAL(noOwncloudFound(QNetworkReply*)),
-//            this, SLOT(slotOCInfoFail(QNetworkReply*)));
-//}
-
-//void AccountSettings::slotOCInfoFail( QNetworkReply *reply)
-//{
-//    QString errStr = tr("unknown problem.");
-//    if( reply ) errStr = reply->errorString();
-
-//    showConnectionLabel( tr("<p>Failed to connect to %1: <tt>%2</tt></p>").arg(Theme::instance()->appNameGUI()).arg(errStr) );
-//    ui->_buttonAdd->setEnabled( false);
-//}
-
 void AccountSettings::slotOpenOC()
 {
   if( _OCUrl.isValid() )
diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index e832831..f047b96 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -81,7 +81,7 @@ void PropagateItemJob::done(SyncFileItem::Status status, const QString &errorStr
     int retries = 0;
 
     if( _item._httpErrorCode == 403 || _item._httpErrorCode == 413 || _item._httpErrorCode == 415 ) {
-        qDebug() << "Fatal Error condition, disallow retry!";
+        qDebug() << "Fatal Error condition" << _item._httpErrorCode << ", forbid retry!";
         retries = -1;
     } else {
         retries = 3; // FIXME: good number of allowed retries?
diff --git a/src/mirall/syncjournaldb.cpp b/src/mirall/syncjournaldb.cpp
index 96d3c30..2679ba2 100644
--- a/src/mirall/syncjournaldb.cpp
+++ b/src/mirall/syncjournaldb.cpp
@@ -686,7 +686,7 @@ int SyncJournalDb::blackListEntryCount()
     QMutexLocker locker(&_mutex);
     if( checkConnect() ) {
         QSqlQuery query(_db);
-        if( ! query.exec("SELECT count(*) FROM blacklist WHERE retrycount >= 0") ) {
+        if( ! query.exec("SELECT count(*) FROM blacklist") ) {
             sqlFail("Count number of blacklist entries failed", query);
         }
         if( query.next() ) {
@@ -702,7 +702,7 @@ int SyncJournalDb::wipeBlacklist()
     if( checkConnect() ) {
         QSqlQuery query(_db);
 
-        query.prepare("DELETE FROM blacklist WHERE retrycount >= 0");
+        query.prepare("DELETE FROM blacklist");
 
         if( ! query.exec() ) {
             sqlFail("Deletion of whole blacklist failed", query);

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