summaryrefslogtreecommitdiff
path: root/source3/smbd/conn.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-07-30 09:59:53 +0000
committerSimo Sorce <idra@samba.org>2002-07-30 09:59:53 +0000
commitedb9158f09d488d9f98dffe477808dd3909b693a (patch)
tree14d97a9ea7d9b95c97d856cb1ad6152200e403a5 /source3/smbd/conn.c
parent02cb8d63bcdf3c55f56d69f17bc905b1047cc573 (diff)
downloadsamba-edb9158f09d488d9f98dffe477808dd3909b693a.tar.gz
samba-edb9158f09d488d9f98dffe477808dd3909b693a.tar.bz2
samba-edb9158f09d488d9f98dffe477808dd3909b693a.zip
OK!
Finally the cascaded VFS patch is in. Testing is very welcome, specially with layered multiple vfs modules. A big thank to Alexander Bokovoy for his work and patience :) Simo. (This used to be commit 56283601afe1836dafe0580532f014e29593c463)
Diffstat (limited to 'source3/smbd/conn.c')
-rw-r--r--source3/smbd/conn.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index c0aa447016..3b6dd61e1e 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -2,6 +2,7 @@
Unix SMB/CIFS implementation.
Manage connections_struct structures
Copyright (C) Andrew Tridgell 1998
+ Copyright (C) Alexander Bokovoy 2002
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -162,11 +163,25 @@ BOOL conn_idle_all(time_t t, int deadtime)
void conn_free(connection_struct *conn)
{
+ smb_vfs_handle_struct *handle, *thandle;
+ void (*done_fptr)(connection_struct *conn);
+
/* Free vfs_connection_struct */
-
- if (conn->dl_handle != NULL) {
- /* Close dlopen() handle */
- sys_dlclose(conn->dl_handle);
+ handle = conn->vfs_private;
+ while(handle) {
+ /* Close dlopen() handle */
+ done_fptr = (void (*)(connection_struct *))sys_dlsym(handle->handle, "vfs_done");
+
+ if (done_fptr == NULL) {
+ DEBUG(3, ("No vfs_done() symbol found in module with handle %p, ignoring\n", handle->handle));
+ } else {
+ done_fptr(conn);
+ }
+ sys_dlclose(handle->handle);
+ DLIST_REMOVE(conn->vfs_private, handle);
+ thandle = handle->next;
+ SAFE_FREE(handle);
+ handle = thandle;
}
DLIST_REMOVE(Connections, conn);