Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/mirall/csyncthread.cpp')
-rw-r--r--src/mirall/csyncthread.cpp42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/mirall/csyncthread.cpp b/src/mirall/csyncthread.cpp
index fffe127d5..245152102 100644
--- a/src/mirall/csyncthread.cpp
+++ b/src/mirall/csyncthread.cpp
@@ -18,6 +18,7 @@
#include "mirall/theme.h"
#include "mirall/logger.h"
#include "mirall/owncloudinfo.h"
+#include "creds/abstractcredentials.h"
#ifdef Q_OS_WIN
#include <windows.h>
@@ -338,21 +339,28 @@ void CSyncThread::startSync()
csync_set_module_property(_csync_ctx, "csync_context", _csync_ctx);
csync_set_userdata(_csync_ctx, this);
- if (_lastAuthCookies.length() > 0) {
- // Stuff cookies inside csync, then we can avoid the intermediate HTTP 401 reply
- // when https://github.com/owncloud/core/pull/4042 is merged.
- QString cookiesAsString;
- foreach(QNetworkCookie c, _lastAuthCookies) {
- cookiesAsString += c.name();
- cookiesAsString += '=';
- cookiesAsString += c.value();
- cookiesAsString += "; ";
- }
- csync_set_module_property(_csync_ctx, "session_key", cookiesAsString.toAscii().data());
- }
+ // TODO: This should be a part of this method, but we don't have
+ // any way to get "session_key" module property from csync. Had we
+ // have it, then we could keep this code and remove it from
+ // AbstractCredentials implementations.
+ cfg.getCredentials()->syncContextPreStart(_csync_ctx);
+ // if (_lastAuthCookies.length() > 0) {
+ // // Stuff cookies inside csync, then we can avoid the intermediate HTTP 401 reply
+ // // when https://github.com/owncloud/core/pull/4042 is merged.
+ // QString cookiesAsString;
+ // foreach(QNetworkCookie c, _lastAuthCookies) {
+ // cookiesAsString += c.name();
+ // cookiesAsString += '=';
+ // cookiesAsString += c.value();
+ // cookiesAsString += "; ";
+ // }
+ // csync_set_module_property(_csync_ctx, "session_key", cookiesAsString.to
+ // }
// csync_set_auth_callback( _csync_ctx, getauth );
+
+
qDebug() << "#### Update start #################################################### >>";
if( csync_update(_csync_ctx) < 0 ) {
handleSyncError(_csync_ctx, "csync_update");
@@ -361,7 +369,7 @@ void CSyncThread::startSync()
qDebug() << "<<#### Update end ###########################################################";
if( csync_reconcile(_csync_ctx) < 0 ) {
- handleSyncError(_csync_ctx, "cysnc_reconcile");
+ handleSyncError(_csync_ctx, "csync_reconcile");
return;
}
@@ -481,10 +489,4 @@ void CSyncThread::cb_progress( CSYNC_PROGRESS *progress, void *userdata )
}
-void CSyncThread::setLastAuthCookies(QList<QNetworkCookie> c)
-{
- _lastAuthCookies = c;
-}
-
-
-}
+} // ns Mirall