Moved deletion of vfs handle into smbd/conn.c as it was being done too
authorJeremy Allison <jra@samba.org>
Fri, 28 Apr 2000 21:09:26 +0000 (21:09 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 28 Apr 2000 21:09:26 +0000 (21:09 +0000)
soon in smbd/service.c (file operations were being done after the
handle was closed).

It looks cleaner in smbd/conn.c as it is part of the closing of a conn
struct anyway.

Jeremy.
(This used to be commit 858eb53dc510d1b27c4f91045fa932a3ef546754)

source3/smbd/conn.c
source3/smbd/service.c

index 83289b218483c9fa8f1ad71890c7cefb088864d9..1dc4ac9e7d953af4c1da183ec0ab692c89aaba2c 100644 (file)
@@ -164,6 +164,21 @@ free a conn structure
 ****************************************************************************/
 void conn_free(connection_struct *conn)
 {
+       /* Close dlopen() handle */
+
+       if (conn->vfs_conn->dl_handle != NULL) {
+               dlclose(conn->vfs_conn->dl_handle);  /* should we check return val? */
+       }
+
+       /* Free vfs_connection_struct */
+           
+       if (conn->vfs_conn != NULL) {
+               if (conn->vfs_conn->groups != NULL) {
+                       free(conn->vfs_conn->groups);
+               }
+               free(conn->vfs_conn);
+       }
+
        DLIST_REMOVE(Connections, conn);
 
        if (conn->ngroups && conn->groups) {
index 8d04ce36e1041abcad636f1506056d5e9544c15f..8e04f7e9896d3a2426b78c87bf5354b4ee1ce847 100644 (file)
@@ -654,21 +654,6 @@ void close_cnum(connection_struct *conn, uint16 vuid)
            
        }
 
-        /* Close dlopen() handle */
-
-        if (conn->vfs_conn->dl_handle != NULL) {
-            dlclose(conn->vfs_conn->dl_handle);  /* should we check return val? */
-        }
-
-        /* Free vfs_connection_struct */
-           
-        if (conn->vfs_conn != NULL) {
-            if (conn->vfs_conn->groups != NULL) {
-                free(conn->vfs_conn->groups);
-            }
-            free(conn->vfs_conn);
-        }
-
        yield_connection(conn,
                         lp_servicename(SNUM(conn)),
                         lp_max_connections(SNUM(conn)));
@@ -697,6 +682,5 @@ void close_cnum(connection_struct *conn, uint16 vuid)
                standard_sub_conn(conn,cmd);
                smbrun(cmd,NULL,False);
        }
-       
        conn_free(conn);
 }