summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-02-17 22:07:26 +0200
committerunknown <bell@sanja.is.com.ua>2003-02-17 22:07:26 +0200
commit1b9b2c3091fc580bff82ca0630221eabd5628d6c (patch)
tree36d57cc3236865b15adff6a4d9784a9ddd977aa6 /vio
parent65508b65ba04d499f900259d52d6b16be871ef4a (diff)
downloadmariadb-git-1b9b2c3091fc580bff82ca0630221eabd5628d6c.tar.gz
client port number added to SHOW PROCESSLIST (SCRUM?)
include/violite.h: port added to reported parameters libmysqld/lib_vio.c: port added to reported parameters sql/sql_class.h: port added to reported parameters sql/sql_parse.cc: port added to reported parameters sql/sql_show.cc: SHOW PROCESSLIST will report port number if it is possible vio/viosocket.c: port added to reported parameters
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);