client: use the socket length from getsockname

Use the length returned by getsockname to perform the getnameinfo call because
the size can depend on the socket type and platform.

Fixes #638723
This commit is contained in:
Jonas Larsson 2011-01-05 11:26:30 +01:00 committed by Wim Taymans
parent 220f911851
commit b5a1719e89

View file

@ -1740,7 +1740,6 @@ gst_rtsp_client_accept (GstRTSPClient * client, GIOChannel * channel)
client->is_ipv6 = addr.ss_family == AF_INET6;
addrlen = sizeof (addr);
if (getnameinfo ((struct sockaddr *) &addr, addrlen, ip, sizeof (ip), NULL, 0,
NI_NUMERICHOST) != 0)
goto getnameinfo_failed;