summaryrefslogtreecommitdiff
path: root/source4/smb_server/tcon.c
diff options
context:
space:
mode:
authorbubulle <bubulle@alioth.debian.org>2011-11-12 13:00:54 +0000
committerbubulle <bubulle@alioth.debian.org>2011-11-12 13:00:54 +0000
commit6fba685eec3a1165ec0b82d72d3ae71e946a1404 (patch)
treef3c0543c8f9df4a22ed62e3bd99d9d7bc1054c14 /source4/smb_server/tcon.c
parent77a7925c0509068d5cd2affd94a3996d0a86035a (diff)
downloadsamba-6fba685eec3a1165ec0b82d72d3ae71e946a1404.tar.gz
Merge upstream 3.6.1 source
git-svn-id: svn://svn.debian.org/svn/pkg-samba/trunk/samba@3972 fc4039ab-9d04-0410-8cac-899223bdd6b0
Diffstat (limited to 'source4/smb_server/tcon.c')
-rw-r--r--source4/smb_server/tcon.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/source4/smb_server/tcon.c b/source4/smb_server/tcon.c
index f8243a006c..34c303c53b 100644
--- a/source4/smb_server/tcon.c
+++ b/source4/smb_server/tcon.c
@@ -22,24 +22,9 @@
#include "includes.h"
#include "smb_server/smb_server.h"
#include "smbd/service_stream.h"
+#include "lib/tsocket/tsocket.h"
#include "ntvfs/ntvfs.h"
-struct socket_address *smbsrv_get_my_addr(void *p, TALLOC_CTX *mem_ctx)
-{
- struct smbsrv_connection *smb_conn = talloc_get_type(p,
- struct smbsrv_connection);
-
- return socket_get_my_addr(smb_conn->connection->socket, mem_ctx);
-}
-
-struct socket_address *smbsrv_get_peer_addr(void *p, TALLOC_CTX *mem_ctx)
-{
- struct smbsrv_connection *smb_conn = talloc_get_type(p,
- struct smbsrv_connection);
-
- return socket_get_peer_addr(smb_conn->connection->socket, mem_ctx);
-}
-
/****************************************************************************
init the tcon structures
****************************************************************************/
@@ -112,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 */