зеркало из https://github.com/nextcloud/desktop.git
CSync: We can access the context directly
This commit is contained in:
Родитель
e36f3c5b10
Коммит
b8e20b412c
|
@ -211,8 +211,6 @@ int csync_init(CSYNC *ctx) {
|
|||
|
||||
ctx->status = CSYNC_STATUS_INIT;
|
||||
|
||||
csync_set_module_property(ctx, "csync_context", ctx);
|
||||
|
||||
/* initialize random generator */
|
||||
srand(time(NULL));
|
||||
|
||||
|
|
|
@ -137,9 +137,7 @@ static int ne_auth( void *userdata, const char *realm, int attempt,
|
|||
strcpy( password, ctx->dav_session.pwd );
|
||||
}
|
||||
} else {
|
||||
if( ctx->dav_session.csync_ctx ) {
|
||||
authcb = csync_get_auth_callback( ctx->dav_session.csync_ctx );
|
||||
}
|
||||
authcb = csync_get_auth_callback( ctx->csync_ctx );
|
||||
if( authcb != NULL ){
|
||||
/* call the csync callback */
|
||||
DEBUG_WEBDAV("Call the csync callback for %s", realm );
|
||||
|
@ -359,7 +357,7 @@ static int post_send_hook(ne_request *req, void *userdata,
|
|||
if( !location ) return NE_OK;
|
||||
|
||||
if( ctx->dav_session.redir_callback ) {
|
||||
if( ctx->dav_session.redir_callback( ctx->dav_session.csync_ctx, location ) ) {
|
||||
if( ctx->dav_session.redir_callback( ctx->csync_ctx, location ) ) {
|
||||
return NE_REDIRECT;
|
||||
} else {
|
||||
return NE_RETRY;
|
||||
|
@ -858,10 +856,6 @@ int owncloud_set_property(CSYNC* ctx, const char *key, void *data) {
|
|||
ctx->owncloud_context->dav_session.read_timeout = *(int*)(data);
|
||||
return 0;
|
||||
}
|
||||
if( c_streq(key, "csync_context")) {
|
||||
ctx->owncloud_context->dav_session.csync_ctx = data;
|
||||
return 0;
|
||||
}
|
||||
if( c_streq(key, "get_dav_session")) {
|
||||
/* Give the ne_session to the caller */
|
||||
*(ne_session**)data = ctx->owncloud_context->dav_session.ctx;
|
||||
|
|
|
@ -87,8 +87,6 @@ struct dav_session_s {
|
|||
|
||||
int read_timeout;
|
||||
|
||||
CSYNC *csync_ctx;
|
||||
|
||||
bool no_recursive_propfind;
|
||||
|
||||
csync_owncloud_redirect_callback_t redir_callback;
|
||||
|
|
|
@ -463,7 +463,6 @@ void SyncEngine::startSync()
|
|||
}
|
||||
}
|
||||
|
||||
csync_set_module_property(_csync_ctx, "csync_context", _csync_ctx);
|
||||
csync_set_userdata(_csync_ctx, this);
|
||||
// TODO: This should be a part of this method, but we don't have
|
||||
// any way to get "session_key" module property from csync. Had we
|
||||
|
|
Загрузка…
Ссылка в новой задаче