[Pkg-owncloud-commits] [owncloud-client] 82/333: csync: Remove more unused stuff

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:37 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 a652fec5a0345ef99f1491f011cb9b3369c35c69
Author: Markus Goetz <markus at woboq.com>
Date:   Thu Feb 27 13:33:22 2014 +0100

    csync: Remove more unused stuff
---
 csync/src/csync.c                | 20 --------------------
 csync/src/csync.h                |  9 ---------
 csync/src/csync_private.h        |  4 ----
 csync/src/csync_reconcile.c      | 10 ----------
 csync/src/vio/csync_vio_method.h |  2 --
 src/mirall/folder.cpp            |  1 -
 src/owncloudcmd/owncloudcmd.cpp  |  1 -
 7 files changed, 47 deletions(-)

diff --git a/csync/src/csync.c b/csync/src/csync.c
index a0474c9..32363fd 100644
--- a/csync/src/csync.c
+++ b/csync/src/csync.c
@@ -127,9 +127,6 @@ int csync_create(CSYNC **csync, const char *local, const char *remote) {
   }
 
   ctx->status_code = CSYNC_STATUS_OK;
-  ctx->options.max_depth = MAX_DEPTH;
-  ctx->options.max_time_difference = MAX_TIME_DIFFERENCE;
-  ctx->options.with_conflict_copys=false;
   ctx->options.local_only_mode = false;
 
   ctx->pwd.uid = getuid();
@@ -168,7 +165,6 @@ int csync_create(CSYNC **csync, const char *local, const char *remote) {
 
 int csync_init(CSYNC *ctx) {
   int rc;
-  time_t timediff = -1;
   char *config = NULL;
 
   if (ctx == NULL) {
@@ -826,22 +822,6 @@ CSYNC_STATUS csync_get_status(CSYNC *ctx) {
   return ctx->status_code;
 }
 
-int csync_enable_conflictcopys(CSYNC* ctx){
-  if (ctx == NULL) {
-    return -1;
-  }
-
-  if (ctx->status & CSYNC_STATUS_INIT) {
-    fprintf(stderr, "This function must be called before initialization.");
-    ctx->status_code = CSYNC_STATUS_CSYNC_STATUS_ERROR;
-    return -1;
-  }
-
-  ctx->options.with_conflict_copys=true;
-
-  return 0;
-}
-
 int csync_set_local_only(CSYNC *ctx, bool local_only) {
     if (ctx == NULL) {
         return -1;
diff --git a/csync/src/csync.h b/csync/src/csync.h
index 5b482f8..2cc24ad 100644
--- a/csync/src/csync.h
+++ b/csync/src/csync.h
@@ -501,15 +501,6 @@ int csync_set_log_userdata(void *data);
 const char *csync_get_statedb_file(CSYNC *ctx);
 
 /**
- * @brief Enable the creation of backup copys if files are changed on both sides
- *
- * @param ctx           The csync context.
- *
- * @return              0 on success, less than 0 if an error occured.
- */
-int csync_enable_conflictcopys(CSYNC *ctx);
-
-/**
   * @brief Flag to tell csync that only a local run is intended. Call before csync_init
   *
   * @param local_only   Bool flag to indicate local only mode.
diff --git a/csync/src/csync_private.h b/csync/src/csync_private.h
index 2bc467a..368bcef 100644
--- a/csync/src/csync_private.h
+++ b/csync/src/csync_private.h
@@ -133,12 +133,8 @@ struct csync_s {
   } module;
 
   struct {
-    int max_depth;
-    int max_time_difference;
     int sync_symbolic_links;
-    int unix_extensions;
     char *config_dir;
-    bool with_conflict_copys;
     bool local_only_mode;
     int timeout;
 #if defined(HAVE_ICONV) && defined(WITH_ICONV)
diff --git a/csync/src/csync_reconcile.c b/csync/src/csync_reconcile.c
index d886cfe..10ffbc0 100644
--- a/csync/src/csync_reconcile.c
+++ b/csync/src/csync_reconcile.c
@@ -202,21 +202,11 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
 
                     if( !cur->etag && other->etag ) cur->etag = c_strdup(other->etag);
                 } else if(ctx->current == REMOTE_REPLICA) {
-                    if(ctx->options.with_conflict_copys) {
                         cur->instruction = CSYNC_INSTRUCTION_CONFLICT;
                         other->instruction = CSYNC_INSTRUCTION_NONE;
-                    } else {
-                        cur->instruction = CSYNC_INSTRUCTION_SYNC;
-                        other->instruction = CSYNC_INSTRUCTION_NONE;
-                    }
                 } else {
-                    if(ctx->options.with_conflict_copys) {
                         cur->instruction = CSYNC_INSTRUCTION_NONE;
                         other->instruction = CSYNC_INSTRUCTION_CONFLICT;
-                    } else {
-                        cur->instruction = CSYNC_INSTRUCTION_NONE;
-                        other->instruction = CSYNC_INSTRUCTION_SYNC;
-                    }
                 }
 
                 break;
diff --git a/csync/src/vio/csync_vio_method.h b/csync/src/vio/csync_vio_method.h
index 931ba42..f7cd198 100644
--- a/csync/src/vio/csync_vio_method.h
+++ b/csync/src/vio/csync_vio_method.h
@@ -38,8 +38,6 @@ typedef struct csync_vio_method_s csync_vio_method_t;
 struct csync_vio_capabilities_s {
  bool atomar_copy_support; /* set to true if the backend provides atomar copy */
  bool do_post_copy_stat;   /* true if csync should check the copy afterwards  */
- int  unix_extensions;     /* -1: do csync detection, 0: no unix extensions,
-                               1: extensions available */
  bool use_send_file_to_propagate; /* if set, the module rather copies files using send_file than read and write */
  bool get_support;
  bool put_support;
diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp
index 1dbf63a..4644c6a 100644
--- a/src/mirall/folder.cpp
+++ b/src/mirall/folder.cpp
@@ -105,7 +105,6 @@ bool Folder::init()
         MirallConfigFile cfgFile;
         csync_set_config_dir( _csync_ctx, cfgFile.configPath().toUtf8() );
 
-        csync_enable_conflictcopys(_csync_ctx);
         setIgnoredFiles();
         if (Account *account = AccountManager::instance()->account()) {
             account->credentials()->syncContextPreInit(_csync_ctx);
diff --git a/src/owncloudcmd/owncloudcmd.cpp b/src/owncloudcmd/owncloudcmd.cpp
index 1b301dd..bf08411 100644
--- a/src/owncloudcmd/owncloudcmd.cpp
+++ b/src/owncloudcmd/owncloudcmd.cpp
@@ -171,7 +171,6 @@ int main(int argc, char **argv) {
     }
 
     csync_set_log_level(options.silent ? 1 : 11);
-    csync_enable_conflictcopys(_csync_ctx);
     Logger::instance()->setLogFile("-");
 
     csync_set_auth_callback( _csync_ctx, getauth );

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