From f37b42b40dde22d8b85ce6d28e2a1e29cf1d1a8b Mon Sep 17 00:00:00 2001 From: Dake Gu Date: Mon, 8 Mar 2010 11:20:51 +0100 Subject: [PATCH] rtspconnection: fix handling of x-server-ip-address Fix handling of x-server-ip-address. --- gst-libs/gst/rtsp/gstrtspconnection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index e501fe6cf1..c03680cda7 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -710,7 +710,7 @@ setup_tunneling (GstRTSPConnection * conn, GTimeVal * timeout) goto wrong_result; if (gst_rtsp_message_get_header (&response, GST_RTSP_HDR_X_SERVER_IP_ADDRESS, - &value, 0) != GST_RTSP_OK) { + &value, 0) == GST_RTSP_OK) { if (conn->proxy_host) { /* if we use a proxy we need to change the destination url */ g_free (url->host); @@ -719,7 +719,7 @@ setup_tunneling (GstRTSPConnection * conn, GTimeVal * timeout) hostparam = g_strdup_printf ("%s:%d", url->host, url_port); } else { /* and resolve the new ip address */ - if (!(ip = do_resolve (conn->ip))) + if (!(ip = do_resolve (value))) goto not_resolved; g_free (conn->ip); conn->ip = ip;