summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2003-02-27 19:38:39 +0200
committerbell@sanja.is.com.ua <>2003-02-27 19:38:39 +0200
commit80236063a124f6fe15bf84dc5f0ee3d3faf20531 (patch)
tree46b83cf5ddbcf0a93b5eb75bc079ef5cc56aa5ba /vio
parenta0d2a621edd4c6ddd6f25bac23a5465a9c662d36 (diff)
parent352a338147a8c51179fdaf7adf730485959148da (diff)
downloadmariadb-git-80236063a124f6fe15bf84dc5f0ee3d3faf20531.tar.gz
merging
Diffstat (limited to 'vio')
-rw-r--r--vio/viosocket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vio/viosocket.c b/vio/viosocket.c
index f69eebd413a..edcea19d76a 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -277,13 +277,14 @@ my_socket vio_fd(Vio* vio)
}
-my_bool vio_peer_addr(Vio * vio, char *buf)
+my_bool vio_peer_addr(Vio * vio, char *buf, u_int16_t *port)
{
DBUG_ENTER("vio_peer_addr");
DBUG_PRINT("enter", ("sd: %d", vio->sd));
if (vio->localhost)
{
strmov(buf,"127.0.0.1");
+ *port= 0;
}
else
{
@@ -295,6 +296,7 @@ my_bool vio_peer_addr(Vio * vio, char *buf)
DBUG_RETURN(1);
}
my_inet_ntoa(vio->remote.sin_addr,buf);
+ *port= ntohs(vio->remote.sin_port);
}
DBUG_PRINT("exit", ("addr: %s", buf));
DBUG_RETURN(0);