Commit d011e960 authored by David Hoyt's avatar David Hoyt Committed by Sebastian Dröge
Browse files

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.
parent 03f2e81f
...@@ -1061,7 +1061,7 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src) ...@@ -1061,7 +1061,7 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src)
switch (msg->status_code) { switch (msg->status_code) {
case SOUP_STATUS_CANT_RESOLVE: case SOUP_STATUS_CANT_RESOLVE:
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, 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)); ("libsoup status code %d", msg->status_code));
src->ret = GST_FLOW_ERROR; src->ret = GST_FLOW_ERROR;
break; break;
...@@ -1075,14 +1075,14 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src) ...@@ -1075,14 +1075,14 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src)
case SOUP_STATUS_CANT_CONNECT_PROXY: case SOUP_STATUS_CANT_CONNECT_PROXY:
case SOUP_STATUS_SSL_FAILED: case SOUP_STATUS_SSL_FAILED:
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, 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)); ("libsoup status code %d", msg->status_code));
src->ret = GST_FLOW_ERROR; src->ret = GST_FLOW_ERROR;
break; break;
case SOUP_STATUS_IO_ERROR: case SOUP_STATUS_IO_ERROR:
case SOUP_STATUS_MALFORMED: case SOUP_STATUS_MALFORMED:
GST_ELEMENT_ERROR (src, RESOURCE, READ, 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)); ("libsoup status code %d", msg->status_code));
src->ret = GST_FLOW_ERROR; src->ret = GST_FLOW_ERROR;
break; break;
...@@ -1095,7 +1095,7 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src) ...@@ -1095,7 +1095,7 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src)
SOUP_STATUS_IS_SERVER_ERROR (msg->status_code)) { SOUP_STATUS_IS_SERVER_ERROR (msg->status_code)) {
/* Report HTTP error. */ /* Report HTTP error. */
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, 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)); ("%d %s", msg->status_code, msg->reason_phrase));
src->ret = GST_FLOW_ERROR; src->ret = GST_FLOW_ERROR;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment