diff options
Diffstat (limited to 'source4/smb_server')
-rw-r--r-- | source4/smb_server/management.c | 16 |
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; |