mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
rtsp-client: ipv4 adress should not be marked ipv6 even if socket is ipv6
https://bugzilla.gnome.org/show_bug.cgi?id=700953
This commit is contained in:
parent
d6a4dee036
commit
e047c9fec1
1 changed files with 3 additions and 1 deletions
|
@ -2389,7 +2389,6 @@ setup_client (GstRTSPClient * client, GSocket * socket,
|
|||
GstRTSPUrl *url;
|
||||
|
||||
read_socket = gst_rtsp_connection_get_read_socket (conn);
|
||||
priv->is_ipv6 = g_socket_get_family (socket) == G_SOCKET_FAMILY_IPV6;
|
||||
|
||||
if (!(address = g_socket_get_remote_address (read_socket, error)))
|
||||
goto no_address;
|
||||
|
@ -2401,9 +2400,12 @@ setup_client (GstRTSPClient * client, GSocket * socket,
|
|||
|
||||
iaddr = g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (address));
|
||||
|
||||
/* socket might be ipv6 but adress still ipv4 */
|
||||
priv->is_ipv6 = g_inet_address_get_family (iaddr) == G_SOCKET_FAMILY_IPV6;
|
||||
priv->server_ip = g_inet_address_to_string (iaddr);
|
||||
g_object_unref (address);
|
||||
} else {
|
||||
priv->is_ipv6 = g_socket_get_family (socket) == G_SOCKET_FAMILY_IPV6;
|
||||
priv->server_ip = g_strdup ("unknown");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue