diff --git a/lib/webfuse/adapter/impl/mountpoint_factory.c b/lib/webfuse/adapter/impl/mountpoint_factory.c index 2da5db3..3062888 100644 --- a/lib/webfuse/adapter/impl/mountpoint_factory.c +++ b/lib/webfuse/adapter/impl/mountpoint_factory.c @@ -20,15 +20,12 @@ wf_impl_mountpoint_factory_init( } void -wf_impl_mountpoint_factory_move( +wf_impl_mountpoint_factory_clone( struct wf_impl_mountpoint_factory * factory, struct wf_impl_mountpoint_factory * other) { other->create_mountpoint = factory->create_mountpoint; other->user_data = factory->user_data; - - factory->create_mountpoint = NULL; - factory->user_data = NULL; } bool diff --git a/lib/webfuse/adapter/impl/mountpoint_factory.h b/lib/webfuse/adapter/impl/mountpoint_factory.h index 63bbbfc..8675879 100644 --- a/lib/webfuse/adapter/impl/mountpoint_factory.h +++ b/lib/webfuse/adapter/impl/mountpoint_factory.h @@ -26,7 +26,7 @@ wf_impl_mountpoint_factory_init( void * user_data); extern void -wf_impl_mountpoint_factory_move( +wf_impl_mountpoint_factory_clone( struct wf_impl_mountpoint_factory * factory, struct wf_impl_mountpoint_factory * other); diff --git a/lib/webfuse/adapter/impl/server_config.c b/lib/webfuse/adapter/impl/server_config.c index ab214f3..4233094 100644 --- a/lib/webfuse/adapter/impl/server_config.c +++ b/lib/webfuse/adapter/impl/server_config.c @@ -48,9 +48,7 @@ void wf_impl_server_config_clone( clone->port = config->port; wf_impl_authenticators_clone(&config->authenticators, &clone->authenticators); - - // ToDo: remove this: move is not clone :-/ - wf_impl_mountpoint_factory_move(&config->mountpoint_factory, &clone->mountpoint_factory); + wf_impl_mountpoint_factory_clone(&config->mountpoint_factory, &clone->mountpoint_factory); } struct wf_server_config * wf_impl_server_config_create(void) diff --git a/lib/webfuse/adapter/impl/server_protocol.c b/lib/webfuse/adapter/impl/server_protocol.c index d97c9a8..1996c67 100644 --- a/lib/webfuse/adapter/impl/server_protocol.c +++ b/lib/webfuse/adapter/impl/server_protocol.c @@ -216,7 +216,7 @@ void wf_impl_server_protocol_init( { protocol->is_operational = false; - wf_impl_mountpoint_factory_move(mountpoint_factory, &protocol->mountpoint_factory); + wf_impl_mountpoint_factory_clone(mountpoint_factory, &protocol->mountpoint_factory); protocol->timer_manager = wf_timer_manager_create(); wf_impl_session_manager_init(&protocol->session_manager);