mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Some code cleanups, removed not needed stuff.
This commit is contained in:
parent
d6287fb5e3
commit
70e89720d5
21
src/csync.c
21
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)) {
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user