From d011e96028b1a8c61dc1080e7ec91471effee58a Mon Sep 17 00:00:00 2001 From: David Hoyt Date: Thu, 19 Aug 2010 17:59:09 +0200 Subject: [PATCH] souphttpsrc: Improve error messages Before they contained the URL before the actual failure. The other way around makes more sense and we do the same in other elements like filesrc. Fixes bug #627289. --- ext/soup/gstsouphttpsrc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index 79268b27cd..22ea771fce 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -1061,7 +1061,7 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src) switch (msg->status_code) { case SOUP_STATUS_CANT_RESOLVE: GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, - ("\"%s\": %s", src->location, msg->reason_phrase), + ("%s: %s", msg->reason_phrase, src->location), ("libsoup status code %d", msg->status_code)); src->ret = GST_FLOW_ERROR; break; @@ -1075,14 +1075,14 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src) case SOUP_STATUS_CANT_CONNECT_PROXY: case SOUP_STATUS_SSL_FAILED: GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, - ("\"%s\": %s", src->location, msg->reason_phrase), + ("%s: %s", msg->reason_phrase, src->location), ("libsoup status code %d", msg->status_code)); src->ret = GST_FLOW_ERROR; break; case SOUP_STATUS_IO_ERROR: case SOUP_STATUS_MALFORMED: GST_ELEMENT_ERROR (src, RESOURCE, READ, - ("\"%s\": %s", src->location, msg->reason_phrase), + ("%s: %s", msg->reason_phrase, src->location), ("libsoup status code %d", msg->status_code)); src->ret = GST_FLOW_ERROR; break; @@ -1095,7 +1095,7 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src) SOUP_STATUS_IS_SERVER_ERROR (msg->status_code)) { /* Report HTTP error. */ GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, - ("\"%s\": %s", src->location, msg->reason_phrase), + ("%s: %s", msg->reason_phrase, src->location), ("%d %s", msg->status_code, msg->reason_phrase)); src->ret = GST_FLOW_ERROR; }