diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2002-08-17 15:27:10 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2002-08-17 15:27:10 +0000 |
commit | 42615b945e2e48e53a21ea47f2e45407913a6a1e (patch) | |
tree | 9e84a17cc57368de704b7fc225bc093b6ff36840 /source/smbd/conn.c | |
parent | d3599b446ed1c8ccd7c9e161ecfa5d52d6066c22 (diff) | |
download | samba-42615b945e2e48e53a21ea47f2e45407913a6a1e.tar.gz samba-42615b945e2e48e53a21ea47f2e45407913a6a1e.tar.xz samba-42615b945e2e48e53a21ea47f2e45407913a6a1e.zip |
Sync 3.0 branch with head
Diffstat (limited to 'source/smbd/conn.c')
-rw-r--r-- | source/smbd/conn.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/source/smbd/conn.c b/source/smbd/conn.c index c0aa4470160..d70e50f8995 100644 --- a/source/smbd/conn.c +++ b/source/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 *the_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); |