mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 13:55:47 +03:00
ownCloud: Fixed var initialization to avoid crash after thread
terminated.
This commit is contained in:
parent
1059c008e5
commit
3d2a43f512
1 changed files with 9 additions and 4 deletions
|
@ -130,12 +130,12 @@ static const ne_propname ls_props[] = {
|
|||
*/
|
||||
|
||||
struct dav_session_s dav_session; /* The DAV Session, initialised in dav_connect */
|
||||
int _connected; /* flag to indicate if a connection exists, ie.
|
||||
int _connected = 0; /* flag to indicate if a connection exists, ie.
|
||||
the dav_session is valid */
|
||||
csync_vio_file_stat_t _fs;
|
||||
|
||||
csync_auth_callback _authcb;
|
||||
void *_userdata;
|
||||
void *_userdata = NULL;
|
||||
|
||||
#define PUT_BUFFER_SIZE 1024*5
|
||||
|
||||
|
@ -431,7 +431,7 @@ static void results(void *userdata,
|
|||
return;
|
||||
}
|
||||
|
||||
DEBUG_WEBDAV(("** propfind result found: %s\n", path ));
|
||||
/* DEBUG_WEBDAV(("** propfind result found: %s\n", path )); */
|
||||
if( ! fetchCtx->target ) {
|
||||
DEBUG_WEBDAV(("error: target must not be zero!\n" ));
|
||||
return;
|
||||
|
@ -475,7 +475,7 @@ static void results(void *userdata,
|
|||
newres->next = fetchCtx->list;
|
||||
fetchCtx->list = newres;
|
||||
fetchCtx->result_count = fetchCtx->result_count + 1;
|
||||
DEBUG_WEBDAV(( "results for URI %s: %d %d\n", newres->name, (int)newres->size, (int)newres->type ));
|
||||
/* DEBUG_WEBDAV(( "results for URI %s: %d %d\n", newres->name, (int)newres->size, (int)newres->type )); */
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1447,6 +1447,9 @@ csync_vio_method_t *vio_module_init(const char *method_name, const char *args,
|
|||
(void) args;
|
||||
_authcb = cb;
|
||||
_userdata = userdata;
|
||||
_connected = 0; /* triggers dav_connect to go through the whole neon setup */
|
||||
|
||||
/* DEBUG_WEBDAV(("********** vio_module_init \n")); */
|
||||
|
||||
return &_method;
|
||||
}
|
||||
|
@ -1459,6 +1462,8 @@ void vio_module_shutdown(csync_vio_method_t *method) {
|
|||
|
||||
if( dav_session.ctx )
|
||||
ne_session_destroy( dav_session.ctx );
|
||||
/* DEBUG_WEBDAV(( "********** vio_module_shutdown\n" )); */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue