[Pkg-owncloud-commits] [owncloud-client] 25/332: CSync: We can access the context directly

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:33 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 b8e20b412c26b2fe0769ce1a9bc562d948521e66
Author: Markus Goetz <markus at woboq.com>
Date:   Thu May 29 12:58:49 2014 +0200

    CSync: We can access the context directly
---
 csync/src/csync.c                  |  2 --
 csync/src/csync_owncloud.c         | 10 ++--------
 csync/src/csync_owncloud_private.h |  2 --
 src/mirall/syncengine.cpp          |  1 -
 4 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/csync/src/csync.c b/csync/src/csync.c
index 3e6d383..d924b55 100644
--- a/csync/src/csync.c
+++ b/csync/src/csync.c
@@ -211,8 +211,6 @@ int csync_init(CSYNC *ctx) {
 
   ctx->status = CSYNC_STATUS_INIT;
 
-  csync_set_module_property(ctx, "csync_context", ctx);
-
   /* initialize random generator */
   srand(time(NULL));
 
diff --git a/csync/src/csync_owncloud.c b/csync/src/csync_owncloud.c
index bed68da..247c38f 100644
--- a/csync/src/csync_owncloud.c
+++ b/csync/src/csync_owncloud.c
@@ -137,9 +137,7 @@ static int ne_auth( void *userdata, const char *realm, int attempt,
                 strcpy( password, ctx->dav_session.pwd );
             }
         } else {
-            if( ctx->dav_session.csync_ctx ) {
-               authcb = csync_get_auth_callback( ctx->dav_session.csync_ctx );
-            }
+               authcb = csync_get_auth_callback( ctx->csync_ctx );
             if( authcb != NULL ){
                 /* call the csync callback */
                 DEBUG_WEBDAV("Call the csync callback for %s", realm );
@@ -359,7 +357,7 @@ static int post_send_hook(ne_request *req, void *userdata,
     if( !location ) return NE_OK;
 
     if( ctx->dav_session.redir_callback ) {
-        if( ctx->dav_session.redir_callback( ctx->dav_session.csync_ctx, location ) ) {
+        if( ctx->dav_session.redir_callback( ctx->csync_ctx, location ) ) {
             return NE_REDIRECT;
         } else {
             return NE_RETRY;
@@ -858,10 +856,6 @@ int owncloud_set_property(CSYNC* ctx, const char *key, void *data) {
         ctx->owncloud_context->dav_session.read_timeout = *(int*)(data);
         return 0;
     }
-    if( c_streq(key, "csync_context")) {
-        ctx->owncloud_context->dav_session.csync_ctx = data;
-        return 0;
-    }
     if( c_streq(key, "get_dav_session")) {
         /* Give the ne_session to the caller */
         *(ne_session**)data = ctx->owncloud_context->dav_session.ctx;
diff --git a/csync/src/csync_owncloud_private.h b/csync/src/csync_owncloud_private.h
index 83b8dc3..eb76a1f 100644
--- a/csync/src/csync_owncloud_private.h
+++ b/csync/src/csync_owncloud_private.h
@@ -87,8 +87,6 @@ struct dav_session_s {
 
     int read_timeout;
 
-    CSYNC *csync_ctx;
-
     bool no_recursive_propfind;
 
     csync_owncloud_redirect_callback_t redir_callback;
diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index c2b64ea..f504035 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -463,7 +463,6 @@ void SyncEngine::startSync()
         }
     }
 
-    csync_set_module_property(_csync_ctx, "csync_context", _csync_ctx);
     csync_set_userdata(_csync_ctx, this);
     // 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

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