diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-09-06 19:15:23 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-09-06 19:15:23 +0300 |
commit | d33eca6156fde0dbc303615da278c098cdb1d0f0 (patch) | |
tree | 57702a3538aab77508c0f967e0f2b84cf2b0cc08 /gst | |
parent | e5a49efa7ffce2ca2eeefb1a8bad97edfc96649f (diff) |
rtsp-stream: Compare IP address strings case insensitive
Otherwise IPv6 addresses might fail this comparision.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtsp-server/rtsp-stream.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c index 9bef965..c57d13d 100644 --- a/gst/rtsp-server/rtsp-stream.c +++ b/gst/rtsp-server/rtsp-stream.c @@ -1056,7 +1056,7 @@ gst_rtsp_stream_reserve_address (GstRTSPStream * stream, /* FIXME: Also reserve the same port with unicast ANY address, since that's * where we are going to bind our socket. */ } else { - if (strcmp ((*addrp)->address, address) || + if (g_ascii_strcasecmp ((*addrp)->address, address) || (*addrp)->port != port || (*addrp)->n_ports != n_ports || (*addrp)->ttl != ttl) goto different_address; @@ -1082,8 +1082,9 @@ no_address: } different_address: { - GST_ERROR_OBJECT (stream, "address %s is not the same that was already" - " reserved", address); + GST_ERROR_OBJECT (stream, + "address %s is not the same as %s that was already" " reserved", + address, (*addrp)->address); g_mutex_unlock (&priv->lock); return NULL; } |