Clean the progress database on csync_commit

It was cleaned twice in csync_destroy because of the conflict resolution

https://github.com/owncloud/mirall/issues/667
This commit is contained in:
Olivier Goffart 2013-06-10 13:35:05 +02:00 committed by Daniel Molkentin
parent 32818283a5
commit 015eeb1e05

View file

@ -768,6 +768,12 @@ int csync_commit(CSYNC *ctx) {
csync_vio_commit(ctx);
while (ctx->progress) {
csync_progressinfo_t *next = ctx->progress->next;
csync_statedb_free_progressinfo(ctx->progress);
ctx->progress = next;
}
/* destroy the rbtrees */
if (c_rbtree_size(ctx->local.tree) > 0) {
c_rbtree_destroy(ctx->local.tree, _tree_destructor);
@ -873,12 +879,6 @@ int csync_destroy(CSYNC *ctx) {
ctx->progress = next;
}
while (ctx->progress) {
csync_progressinfo_t *next = ctx->progress->next;
csync_statedb_free_progressinfo(ctx->progress);
ctx->progress = next;
}
/* destroy the rbtrees */
if (c_rbtree_size(ctx->local.tree) > 0) {
c_rbtree_destroy(ctx->local.tree, _tree_destructor);