Get socket family from struct sockaddr_storage
The struct sockaddr_storage has a member variable that tells the socket family.
This commit is contained in:
@ -2862,7 +2862,7 @@ dcb_accept(DCB *listener)
|
|||||||
client_dcb->fd = c_sock;
|
client_dcb->fd = c_sock;
|
||||||
|
|
||||||
// get client address
|
// get client address
|
||||||
if (((struct sockaddr *)&client_conn)->sa_family == AF_UNIX)
|
if (client_conn.ss_family == AF_UNIX)
|
||||||
{
|
{
|
||||||
// client address
|
// client address
|
||||||
client_dcb->remote = MXS_STRDUP_A("localhost_from_socket");
|
client_dcb->remote = MXS_STRDUP_A("localhost_from_socket");
|
||||||
|
Reference in New Issue
Block a user