mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Allow to set progress- and log-callback any time.
This commit is contained in:
parent
84f425a326
commit
0c5cdc2105
11
src/csync.c
11
src/csync.c
@ -904,11 +904,6 @@ int csync_set_log_callback(CSYNC *ctx, csync_log_callback cb) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ctx->status & CSYNC_STATUS_INIT) {
|
||||
fprintf(stderr, "csync_set_log_callback: This function must be called before initialization.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ctx->callbacks.log_function = cb;
|
||||
|
||||
return 0;
|
||||
@ -1071,12 +1066,6 @@ int csync_set_progress_callback(CSYNC* ctx, csync_progress_callback cb)
|
||||
ctx->error_code = CSYNC_ERR_NONE;
|
||||
ctx->callbacks.progresscb = cb;
|
||||
|
||||
if (ctx->status & CSYNC_STATUS_INIT) {
|
||||
fprintf(stderr, "csync_set_progress_callback: This function must be called before initialization.\n");
|
||||
ctx->error_code = CSYNC_ERR_UNSPEC;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user