Merge remote-tracking branch 'freitag/dav' into ocsync

This commit is contained in:
Klaas Freitag 2013-10-23 14:37:12 +02:00
commit e7b94e437e
6 changed files with 24 additions and 12 deletions

View file

@ -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 "4")
set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")

View file

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

View file

@ -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 */

View file

@ -787,7 +787,7 @@ csync_file_stat_t *csync_statedb_get_stat_by_hash(sqlite3 *db,
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);
@ -825,7 +825,7 @@ csync_file_stat_t *csync_statedb_get_stat_by_inode(sqlite3 *db,
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;
}
@ -851,10 +851,10 @@ csync_file_stat_t *csync_statedb_get_stat_by_inode(sqlite3 *db,
/* clear the whole structure */
ZERO_STRUCTP(st);
st->phash = strtoull(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 = atoi(result->vector[3]);
st->inode = atoll(result->vector[3]);
st->uid = atoi(result->vector[4]);
st->gid = atoi(result->vector[5]);
st->mode = atoi(result->vector[6]);

View file

@ -208,7 +208,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;
@ -239,7 +239,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
if (ctx->current == LOCAL_REPLICA) {
tmp = csync_statedb_get_stat_by_inode(ctx->statedb.db, 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) {

View file

@ -36,15 +36,16 @@
#include <neon/ne_request.h>
#include <neon/ne_basic.h>
#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, transfer->user_data); \
} }
#endif
// #endif
#define DEFAULT_BLOCK_SIZE (10*1024*1024)