From 738d868d3892806cdca54aacb18a161e142b64b6 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Wed, 16 Oct 2013 09:29:24 +0200 Subject: [PATCH 1/6] Bump version to 0.90.3 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4634ef51..fce7ad8bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(APPLICATION_NAME ${PROJECT_NAME}) set(APPLICATION_VERSION_MAJOR "0") set(APPLICATION_VERSION_MINOR "90") -set(APPLICATION_VERSION_PATCH "2") +set(APPLICATION_VERSION_PATCH "3") set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}") From 0e61036fa5882b301734773332e1ae4012f06586 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Thu, 17 Oct 2013 16:40:04 +0200 Subject: [PATCH 2/6] Build with HBF debug all time. --- src/httpbf/src/httpbf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/httpbf/src/httpbf.c b/src/httpbf/src/httpbf.c index d3f027fc3..6678aaa46 100644 --- a/src/httpbf/src/httpbf.c +++ b/src/httpbf/src/httpbf.c @@ -36,15 +36,16 @@ #include #include -#ifdef NDEBUG -#define DEBUG_HBF(...) -#else +// #ifdef NDEBUG +// #define DEBUG_HBF(...) +// #else #define DEBUG_HBF(...) { if(transfer->log_cb) { \ char buf[1024]; \ snprintf(buf, 1024, __VA_ARGS__); \ transfer->log_cb(__FUNCTION__, buf); \ } } -#endif + +// #endif #define DEFAULT_BLOCK_SIZE (10*1024*1024) From a1699bbbcef68c4601a355e5e671d3c67c038315 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Fri, 18 Oct 2013 14:57:11 +0200 Subject: [PATCH 3/6] Set version to 0.90.4 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fce7ad8bf..5b5503d27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(APPLICATION_NAME ${PROJECT_NAME}) set(APPLICATION_VERSION_MAJOR "0") set(APPLICATION_VERSION_MINOR "90") -set(APPLICATION_VERSION_PATCH "3") +set(APPLICATION_VERSION_PATCH "4") set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}") From 0f6ca35e9554924ef70fa33f553a343e92cb70e2 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Fri, 18 Oct 2013 15:11:09 +0200 Subject: [PATCH 4/6] Updated changelog for 0.90.4. --- ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 59be24d2d..c4cca3b98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ ChangeLog ========== +version 0.90.4 (released 2013-10-18, ownCloud Client 1.4.2) + + * Count renamed and deleted files for progress information. + * Do not reset csync internal error state in helper funcs + and do not overwrite error messages. + That fixes error reporting to the client. + * Disable check on inodes on all platforms as inodes are not + reliable. + * Fix resuming after user aborting the sync process. + * enabled HBF debugging permanently. + version 0.90.1 (released 2013-09-24, ownCloud Client 1.4.1) * no more check on the local inode in updater for win32 (bug #779) * detect if server does not send an etag after an upload From e16560249c29ee15e2655eae9ff964886dec56c6 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Tue, 22 Oct 2013 17:49:49 +0200 Subject: [PATCH 5/6] Use atoll to convert inode from db query results. --- src/csync_dbtree.c | 2 +- src/csync_statedb.c | 8 ++++---- src/csync_update.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/csync_dbtree.c b/src/csync_dbtree.c index 49581801f..00bb94ae0 100644 --- a/src/csync_dbtree.c +++ b/src/csync_dbtree.c @@ -137,7 +137,7 @@ csync_vio_method_handle_t *csync_dbtree_opendir(CSYNC *ctx, const char *name) fs->name = c_strdup(column+strlen(path)+1); column = list->vector[base+2]; /* inode */ - fs->inode = atoi(column); + fs->inode = atoll(column); fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_INODE; column = list->vector[base+3]; /* uid */ diff --git a/src/csync_statedb.c b/src/csync_statedb.c index df5ec601c..c3cd17f68 100644 --- a/src/csync_statedb.c +++ b/src/csync_statedb.c @@ -737,7 +737,7 @@ csync_file_stat_t *csync_statedb_get_stat_by_hash(CSYNC *ctx, uint64_t phash) { st->pathlen = sqlite3_column_int(_by_hash_stmt, 1); memcpy(st->path, (len ? (char*) sqlite3_column_text(_by_hash_stmt, 2) : ""), len + 1); - st->inode = sqlite3_column_int(_by_hash_stmt,3); + st->inode = sqlite3_column_int64(_by_hash_stmt,3); st->uid = sqlite3_column_int(_by_hash_stmt, 4); st->gid = sqlite3_column_int(_by_hash_stmt, 5); st->mode = sqlite3_column_int(_by_hash_stmt, 6); @@ -774,7 +774,7 @@ csync_file_stat_t *csync_statedb_get_stat_by_inode(CSYNC *ctx, uint64_t inode) { size_t len = 0; stmt = sqlite3_mprintf("SELECT * FROM metadata WHERE inode='%lld'", - (long long unsigned int) inode); + (long long signed int) inode); if (stmt == NULL) { return NULL; } @@ -800,10 +800,10 @@ csync_file_stat_t *csync_statedb_get_stat_by_inode(CSYNC *ctx, uint64_t inode) { /* clear the whole structure */ ZERO_STRUCTP(st); - st->phash = strtoull(result->vector[0], NULL, 10); + st->phash = atoll(result->vector[0], NULL, 10); st->pathlen = atoi(result->vector[1]); memcpy(st->path, (len ? result->vector[2] : ""), len + 1); - st->inode = atoi(result->vector[3]); + st->inode = atoll(result->vector[3], NULL, 10); st->uid = atoi(result->vector[4]); st->gid = atoi(result->vector[5]); st->mode = atoi(result->vector[6]); diff --git a/src/csync_update.c b/src/csync_update.c index 381b370f4..f750dd9f8 100644 --- a/src/csync_update.c +++ b/src/csync_update.c @@ -199,7 +199,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file, if(tmp && tmp->phash == h ) { /* there is an entry in the database */ /* we have an update! */ CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Database entry found, compare: %" PRId64 " <-> %" PRId64 ", md5: %s <-> %s, inode: %" PRId64 " <-> %" PRId64, - ((int64_t) fs->mtime), ((int64_t) tmp->modtime), fs->md5, tmp->md5, (int64_t) fs->inode, (int64_t) tmp->inode); + ((int64_t) fs->mtime), ((int64_t) tmp->modtime), fs->md5, tmp->md5, (uint64_t) fs->inode, (uint64_t) tmp->inode); if( !fs->md5) { st->instruction = CSYNC_INSTRUCTION_EVAL; goto out; @@ -230,7 +230,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file, if (ctx->current == LOCAL_REPLICA) { tmp = csync_statedb_get_stat_by_inode(ctx, fs->inode); if (tmp && tmp->inode == fs->inode && (tmp->modtime == fs->mtime || fs->type == CSYNC_VIO_FILE_TYPE_DIRECTORY)) { - CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "inodes: %" PRId64 " <-> %" PRId64, (int64_t) tmp->inode, (int64_t) fs->inode); + CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "inodes: %" PRId64 " <-> %" PRId64, (uint64_t) tmp->inode, (uint64_t) fs->inode); /* inode found so the file has been renamed */ st->instruction = CSYNC_INSTRUCTION_RENAME; if (fs->type == CSYNC_VIO_FILE_TYPE_DIRECTORY) { From 74c642607535e88ebbf511cd56db19e369d5488a Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Tue, 22 Oct 2013 17:58:18 +0200 Subject: [PATCH 6/6] Fix call to atoll, just pass the buffer --- src/csync_statedb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csync_statedb.c b/src/csync_statedb.c index c3cd17f68..07e85a7a5 100644 --- a/src/csync_statedb.c +++ b/src/csync_statedb.c @@ -800,10 +800,10 @@ csync_file_stat_t *csync_statedb_get_stat_by_inode(CSYNC *ctx, uint64_t inode) { /* clear the whole structure */ ZERO_STRUCTP(st); - st->phash = atoll(result->vector[0], NULL, 10); + st->phash = atoll(result->vector[0]); st->pathlen = atoi(result->vector[1]); memcpy(st->path, (len ? result->vector[2] : ""), len + 1); - st->inode = atoll(result->vector[3], NULL, 10); + st->inode = atoll(result->vector[3]); st->uid = atoi(result->vector[4]); st->gid = atoi(result->vector[5]); st->mode = atoi(result->vector[6]);