diff options
Diffstat (limited to 'vio')
-rw-r--r-- | vio/viossl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vio/viossl.c b/vio/viossl.c index 0f34a45f9aa..834343a77d9 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -212,13 +212,14 @@ my_socket vio_ssl_fd(Vio* vio) } -my_bool vio_ssl_peer_addr(Vio * vio, char *buf) +my_bool vio_ssl_peer_addr(Vio * vio, char *buf, uint16 *port) { DBUG_ENTER("vio_ssl_peer_addr"); DBUG_PRINT("enter", ("sd=%d", vio->sd)); if (vio->localhost) { strmov(buf,"127.0.0.1"); + *port=0; } else { @@ -229,8 +230,13 @@ my_bool vio_ssl_peer_addr(Vio * vio, char *buf) DBUG_PRINT("exit", ("getpeername, error: %d", socket_errno)); DBUG_RETURN(1); } - /* FIXME */ -/* my_inet_ntoa(vio->remote.sin_addr,buf); */ +#ifdef TO_BE_FIXED + my_inet_ntoa(vio->remote.sin_addr,buf); + *port= 0; +#else + strmov(buf, "unknown"); + *port= 0; +#endif } DBUG_PRINT("exit", ("addr=%s", buf)); DBUG_RETURN(0); |