diff options
author | Jeremy Allison <jra@samba.org> | 2005-08-02 23:55:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:00:23 -0500 |
commit | 14dd5ab632ff9abb9582e6484187c6ee1573cdd6 (patch) | |
tree | 32486c85ea3e5e7bebd3f31368c9050d8539fd59 /source/smbd/conn.c | |
parent | bd49c3133988300969e64a20c6c85fff768b985b (diff) | |
download | samba-14dd5ab632ff9abb9582e6484187c6ee1573cdd6.tar.gz samba-14dd5ab632ff9abb9582e6484187c6ee1573cdd6.tar.xz samba-14dd5ab632ff9abb9582e6484187c6ee1573cdd6.zip |
r8963: Clean up the horrid "fake conn struct" part of MSDFS.
Jeremy.
Diffstat (limited to 'source/smbd/conn.c')
-rw-r--r-- | source/smbd/conn.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source/smbd/conn.c b/source/smbd/conn.c index 534a3367d48..b69868ecec1 100644 --- a/source/smbd/conn.c +++ b/source/smbd/conn.c @@ -225,10 +225,10 @@ void conn_clear_vuid_cache(uint16 vuid) } /**************************************************************************** - Free a conn structure. + Free a conn structure - internal part. ****************************************************************************/ -void conn_free(connection_struct *conn) +void conn_free_internal(connection_struct *conn) { vfs_handle_struct *handle = NULL, *thandle = NULL; TALLOC_CTX *mem_ctx = NULL; @@ -243,8 +243,6 @@ void conn_free(connection_struct *conn) handle = thandle; } - DLIST_REMOVE(Connections, conn); - if (conn->ngroups && conn->groups) { SAFE_FREE(conn->groups); conn->ngroups = 0; @@ -264,15 +262,25 @@ void conn_free(connection_struct *conn) string_free(&conn->connectpath); string_free(&conn->origpath); - bitmap_clear(bmap, conn->cnum); - num_open--; - mem_ctx = conn->mem_ctx; ZERO_STRUCTP(conn); talloc_destroy(mem_ctx); } +/**************************************************************************** + Free a conn structure. +****************************************************************************/ + +void conn_free(connection_struct *conn) +{ + DLIST_REMOVE(Connections, conn); + bitmap_clear(bmap, conn->cnum); + num_open--; + + conn_free_internal(conn); +} + /**************************************************************************** receive a smbcontrol message to forcibly unmount a share the message contains just a share name and all instances of that |