Small fix on sample server code (displaying of IPv6 addresses).
This commit is contained in:
parent
d021b7eb7f
commit
52cc1a1a18
1 changed files with 2 additions and 2 deletions
|
|
@ -204,8 +204,8 @@ accept_client(int server_fd)
|
||||||
tmp, sizeof tmp);
|
tmp, sizeof tmp);
|
||||||
break;
|
break;
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
name = inet_ntop(AF_INET,
|
name = inet_ntop(AF_INET6,
|
||||||
&((struct sockaddr_in *)&sa)->sin_addr,
|
&((struct sockaddr_in6 *)&sa)->sin6_addr,
|
||||||
tmp, sizeof tmp);
|
tmp, sizeof tmp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue