From 70e89720d5ebdb9f1e9afa9fcf46e80c86cef03f Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Thu, 20 Dec 2012 17:10:03 +0100 Subject: [PATCH] Some code cleanups, removed not needed stuff. --- src/csync.c | 21 --------------------- src/csync.h | 5 ----- src/csync_misc.c | 1 - src/csync_propagate.c | 3 --- 4 files changed, 30 deletions(-) diff --git a/src/csync.c b/src/csync.c index a5310ae653..dbce1105b7 100644 --- a/src/csync.c +++ b/src/csync.c @@ -994,27 +994,6 @@ CSYNC_ERROR_CODE csync_get_error(CSYNC *ctx) { return ctx->error_code; } -bool csync_file_known( char *statedb_file, const char* url ) { - int len; - uint64_t h; - csync_file_stat_t *sb; - CSYNC *ctx = NULL; - - if( ! url ) return false; - - ctx = c_malloc(sizeof(CSYNC)); - ctx->statedb.file = statedb_file; - - len = strlen(statedb_file); - h = c_jhash64((uint8_t *) url, len, 0); - - sb = csync_statedb_get_stat_by_hash(ctx, h); - - free(ctx); - - return( sb != NULL ); -} - int csync_set_module_property(CSYNC* ctx, const char* key, void* value) { if (!(ctx->status & CSYNC_STATUS_INIT)) { diff --git a/src/csync.h b/src/csync.h index f895991e35..fc7ed7c46f 100644 --- a/src/csync.h +++ b/src/csync.h @@ -88,7 +88,6 @@ enum csync_error_codes_e { CSYNC_ERR_LOCAL_CREATE, CSYNC_ERR_LOCAL_STAT, CSYNC_ERR_PROXY, - CSYNC_ERR_REMOTE_CLEANUP, CSYNC_ERR_LOOKUP, CSYNC_ERR_AUTH_SERVER, CSYNC_ERR_AUTH_PROXY, @@ -490,10 +489,6 @@ int csync_set_iconv_codec(const char *from); */ CSYNC_ERROR_CODE csync_get_error(CSYNC *ctx); -/* dirty stuff from here on - EXPERIMENTAL */ -/* read the information if a file is known to csync ie. if it has an entry in the database */ -bool csync_file_known( char *statedb_file, const char* url ); - /** * @brief Set a property to module * diff --git a/src/csync_misc.c b/src/csync_misc.c index fb20349ad9..c4f1357149 100644 --- a/src/csync_misc.c +++ b/src/csync_misc.c @@ -172,7 +172,6 @@ CSYNC_ERROR_CODE csync_errno_to_csync_error(CSYNC_ERROR_CODE default_err) CSYNC_ERR_LOCAL_CREATE, CSYNC_ERR_LOCAL_STAT, CSYNC_ERR_PROXY, - CSYNC_ERR_REMOTE_CLEANUP, CSYNC_ERR_LOOKUP, CSYNC_ERR_AUTH_SERVER, CSYNC_ERR_AUTH_PROXY, diff --git a/src/csync_propagate.c b/src/csync_propagate.c index bdbf7d57f9..6ec4074a24 100644 --- a/src/csync_propagate.c +++ b/src/csync_propagate.c @@ -1209,19 +1209,16 @@ static int _csync_correct_id(CSYNC *ctx) { c_list_t *seen_dirs = NULL; c_list_t *list = NULL; c_rbtree_t *tree = NULL; - const char *replica = NULL; char *path = NULL; switch (ctx->current) { case LOCAL_REPLICA: list = ctx->local.id_list; tree = ctx->local.tree; - replica = "LOCAL_REPLICA"; break; case REMOTE_REPLICA: list = ctx->remote.id_list; tree = ctx->remote.tree; - replica = "REMOTE_REPLICA"; break; default: break;