summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-27 16:05:08 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-27 17:05:30 +0200
commit41d970718a105a1321cf80bc1004b51b7af7cc69 (patch)
tree0a70b7f25aa43773b92a888070a7a89b9d143a4c /source4/smb_server
parentb7782514b91b365ec07426d4adfc8f59c53c372e (diff)
downloadsamba-41d970718a105a1321cf80bc1004b51b7af7cc69.tar.gz
samba-41d970718a105a1321cf80bc1004b51b7af7cc69.tar.bz2
samba-41d970718a105a1321cf80bc1004b51b7af7cc69.zip
s4:smb_server: use tsocket_address_string() for debugging the client address
metze
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/management.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/smb_server/management.c b/source4/smb_server/management.c
index b8e42aec40..05373595c0 100644
--- a/source4/smb_server/management.c
+++ b/source4/smb_server/management.c
@@ -79,9 +79,15 @@ static NTSTATUS smbsrv_tcon_information(struct irpc_message *msg,
{
struct smbsrv_connection *smb_conn = talloc_get_type(msg->private_data,
struct smbsrv_connection);
+ struct tsocket_address *client_addr = smb_conn->connection->remote_address;
+ char *client_addr_string;
int i=0, count=0;
struct smbsrv_tcon *tcon;
+ /* This is for debugging only! */
+ client_addr_string = tsocket_address_string(client_addr, r);
+ NT_STATUS_HAVE_NO_MEMORY(client_addr_string);
+
/* count the number of tcons */
for (tcon=smb_conn->smb_tcons.list; tcon; tcon=tcon->next) {
count++;
@@ -93,14 +99,8 @@ static NTSTATUS smbsrv_tcon_information(struct irpc_message *msg,
for (tcon=smb_conn->smb_tcons.list; tcon; tcon=tcon->next) {
struct smbsrv_tcon_info *info = &r->out.info.tcons.tcons[i];
- struct socket_address *client_addr;
- client_addr = socket_get_peer_addr(smb_conn->connection->socket, r);
-
- if (client_addr) {
- info->client_ip = client_addr->addr;
- } else {
- info->client_ip = NULL;
- }
+
+ info->client_ip = client_addr_string;
info->tid = tcon->tid;
info->share_name = tcon->share_name;