summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2003-02-17 22:07:26 +0200
committerbell@sanja.is.com.ua <>2003-02-17 22:07:26 +0200
commit352a338147a8c51179fdaf7adf730485959148da (patch)
tree36d57cc3236865b15adff6a4d9784a9ddd977aa6 /vio
parent126e0857499a730458cca7f243a634b8f30be826 (diff)
downloadmariadb-git-352a338147a8c51179fdaf7adf730485959148da.tar.gz
client port number added to SHOW PROCESSLIST (SCRUM?)
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);