[Pkg-owncloud-commits] [owncloud-client] 43/332: CSync: Always have statedb enabled
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:36 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 6897c5d41f9944aeb0746eaba8dde2d37e7bad6a
Author: Markus Goetz <markus at woboq.com>
Date: Wed Jun 4 11:03:02 2014 +0200
CSync: Always have statedb enabled
---
csync/src/csync.c | 52 ----------------------------------------------------
csync/src/csync.h | 36 ------------------------------------
2 files changed, 88 deletions(-)
diff --git a/csync/src/csync.c b/csync/src/csync.c
index 54d35e5..40ec1ef 100644
--- a/csync/src/csync.c
+++ b/csync/src/csync.c
@@ -204,7 +204,6 @@ int csync_update(CSYNC *ctx) {
ctx->status_code = CSYNC_STATUS_OK;
/* create/load statedb */
- if (! csync_is_statedb_disabled(ctx)) {
rc = asprintf(&ctx->statedb.file, "%s/.csync_journal.db",
ctx->local.uri);
if (rc < 0) {
@@ -218,7 +217,6 @@ int csync_update(CSYNC *ctx) {
rc = -1;
return rc;
}
- }
ctx->status_code = CSYNC_STATUS_OK;
@@ -681,47 +679,6 @@ void csync_clear_exclude_list(CSYNC *ctx)
csync_exclude_clear(ctx);
}
-int csync_enable_statedb(CSYNC *ctx) {
- if (ctx == NULL) {
- return -1;
- }
- ctx->status_code = CSYNC_STATUS_OK;
-
- 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->statedb.disabled = 0;
-
- return 0;
-}
-
-int csync_disable_statedb(CSYNC *ctx) {
- if (ctx == NULL) {
- return -1;
- }
- ctx->status_code = CSYNC_STATUS_OK;
-
- 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->statedb.disabled = 1;
-
- return 0;
-}
-
-int csync_is_statedb_disabled(CSYNC *ctx) {
- if (ctx == NULL) {
- return -1;
- }
- return ctx->statedb.disabled;
-}
-
int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb) {
if (ctx == NULL || cb == NULL) {
return -1;
@@ -737,15 +694,6 @@ int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb) {
return 0;
}
-const char *csync_get_statedb_file(CSYNC *ctx) {
- if (ctx == NULL) {
- return NULL;
- }
- ctx->status_code = CSYNC_STATUS_OK;
-
- return c_strdup(ctx->statedb.file);
-}
-
void *csync_get_userdata(CSYNC *ctx) {
if (ctx == NULL) {
return NULL;
diff --git a/csync/src/csync.h b/csync/src/csync.h
index f4a1816..4fd46f3 100644
--- a/csync/src/csync.h
+++ b/csync/src/csync.h
@@ -336,33 +336,6 @@ int csync_add_exclude_list(CSYNC *ctx, const char *path);
void csync_clear_exclude_list(CSYNC *ctx);
/**
- * @brief Enable the usage of the statedb. It is enabled by default.
- *
- * @param ctx The csync context.
- *
- * @return 0 on success, less than 0 if an error occured.
- */
-int csync_enable_statedb(CSYNC *ctx);
-
-/**
- * @brief Disable the usage of the statedb. It is enabled by default.
- *
- * @param ctx The csync context.
- *
- * @return 0 on success, less than 0 if an error occured.
- */
-int csync_disable_statedb(CSYNC *ctx);
-
-/**
- * @brief Check if the statedb usage is enabled.
- *
- * @param ctx The csync context.
- *
- * @return 1 if it is enabled, 0 if it is disabled.
- */
-int csync_is_statedb_disabled(CSYNC *ctx);
-
-/**
* @brief Get the userdata saved in the context.
*
* @param ctx The csync context.
@@ -454,15 +427,6 @@ void *csync_get_log_userdata(void);
*/
int csync_set_log_userdata(void *data);
-/**
- * @brief Get the path of the statedb file used.
- *
- * @param ctx The csync context.
- *
- * @return The path to the statedb file, NULL if an error occured.
- */
-const char *csync_get_statedb_file(CSYNC *ctx);
-
/* Used for special modes or debugging */
CSYNC_STATUS csync_get_status(CSYNC *ctx);
--
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