diff options
Diffstat (limited to 'source4/smb_server')
-rw-r--r-- | source4/smb_server/handle.c | 3 | ||||
-rw-r--r-- | source4/smb_server/session.c | 3 | ||||
-rw-r--r-- | source4/smb_server/tcon.c | 5 |
3 files changed, 4 insertions, 7 deletions
diff --git a/source4/smb_server/handle.c b/source4/smb_server/handle.c index 07b49bf79d..ebeecac603 100644 --- a/source4/smb_server/handle.c +++ b/source4/smb_server/handle.c @@ -85,9 +85,8 @@ struct smbsrv_handle *smbsrv_smb2_handle_find(struct smbsrv_tcon *smb_tcon, /* destroy a connection structure */ -static int smbsrv_handle_destructor(void *ptr) +static int smbsrv_handle_destructor(struct smbsrv_handle *handle) { - struct smbsrv_handle *handle = talloc_get_type(ptr, struct smbsrv_handle); struct smbsrv_handles_context *handles_ctx; handles_ctx = &handle->tcon->handles; diff --git a/source4/smb_server/session.c b/source4/smb_server/session.c index 50338ba16e..06c4f62904 100644 --- a/source4/smb_server/session.c +++ b/source4/smb_server/session.c @@ -122,9 +122,8 @@ NTSTATUS smbsrv_session_sesssetup_finished(struct smbsrv_session *sess, /**************************************************************************** destroy a session structure ****************************************************************************/ -static int smbsrv_session_destructor(void *p) +static int smbsrv_session_destructor(struct smbsrv_session *sess) { - struct smbsrv_session *sess = talloc_get_type(p, struct smbsrv_session); struct smbsrv_connection *smb_conn = sess->smb_conn; idr_remove(smb_conn->sessions.idtree_vuid, sess->vuid); diff --git a/source4/smb_server/tcon.c b/source4/smb_server/tcon.c index ad68ddb836..026a03bf53 100644 --- a/source4/smb_server/tcon.c +++ b/source4/smb_server/tcon.c @@ -111,13 +111,12 @@ struct smbsrv_tcon *smbsrv_smb2_tcon_find(struct smbsrv_session *smb_sess, /* destroy a connection structure */ -static int smbsrv_tcon_destructor(void *ptr) +static int smbsrv_tcon_destructor(struct smbsrv_tcon *tcon) { - struct smbsrv_tcon *tcon = talloc_get_type(ptr, struct smbsrv_tcon); struct smbsrv_tcons_context *tcons_ctx; struct socket_address *client_addr; - client_addr = socket_get_peer_addr(tcon->smb_conn->connection->socket, ptr); + client_addr = socket_get_peer_addr(tcon->smb_conn->connection->socket, tcon); DEBUG(3,("%s closed connection to service %s\n", client_addr ? client_addr->addr : "(unknown)", tcon->share_name)); |