summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/tcon.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/smb_server/tcon.c b/source4/smb_server/tcon.c
index 3259ec3799..34c303c53b 100644
--- a/source4/smb_server/tcon.c
+++ b/source4/smb_server/tcon.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "smb_server/smb_server.h"
#include "smbd/service_stream.h"
+#include "lib/tsocket/tsocket.h"
#include "ntvfs/ntvfs.h"
/****************************************************************************
@@ -96,11 +97,12 @@ struct smbsrv_tcon *smbsrv_smb2_tcon_find(struct smbsrv_session *smb_sess,
static int smbsrv_tcon_destructor(struct smbsrv_tcon *tcon)
{
struct smbsrv_tcons_context *tcons_ctx;
- struct socket_address *client_addr;
+ struct tsocket_address *client_addr;
+
+ client_addr = tcon->smb_conn->connection->remote_address;
- 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)",
+ tsocket_address_string(client_addr, tcon),
tcon->share_name));
/* tell the ntvfs backend that we are disconnecting */