diff --git a/ChangeLog b/ChangeLog index 09592c2ee5..ea9217b157 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-17 Tim-Philipp Müller + + * ext/neon/gstneonhttpsrc.c: (gst_neonhttp_src_start): + Don't post LIBRARY_INIT errors where we should be posting + RESOURCE OPEN_READ errors. Fixes #552506. + 2008-09-17 Jan Schmidt * ext/jack/gstjackaudiosink.c: (jack_process_cb): diff --git a/ext/neon/gstneonhttpsrc.c b/ext/neon/gstneonhttpsrc.c index 0ad6339df3..49fc719959 100644 --- a/ext/neon/gstneonhttpsrc.c +++ b/ext/neon/gstneonhttpsrc.c @@ -496,8 +496,9 @@ gst_neonhttp_src_start (GstBaseSrc * bsrc) ne_oom_callback (oom_callback); - if (ne_sock_init () != 0) - return FALSE; + res = ne_sock_init (); + if (res != 0) + goto init_failed; res = gst_neonhttp_src_send_request_and_redirect (src, &src->session, &src->request, 0, src->automatic_redirect); @@ -509,7 +510,7 @@ gst_neonhttp_src_start (GstBaseSrc * bsrc) GST_ERROR_OBJECT (src, "HTTP Request failed when opening socket!"); } #endif - goto init_failed; + goto socket_error; } else if (res == HTTP_REQUEST_WRONG_PROXY) { #ifndef GST_DISABLE_GST_DEBUG if (src->neon_http_debug) { @@ -584,19 +585,25 @@ gst_neonhttp_src_start (GstBaseSrc * bsrc) /* ERRORS */ init_failed: { - GST_ELEMENT_ERROR (src, LIBRARY, INIT, + GST_ELEMENT_ERROR (src, LIBRARY, INIT, (NULL), + ("ne_sock_init() failed: %d", res)); + return FALSE; + } +socket_error: + { + GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL), ("Could not initialize neon library (%i)", res)); return FALSE; } wrong_proxy: { - GST_ELEMENT_ERROR (src, LIBRARY, INIT, + GST_ELEMENT_ERROR (src, RESOURCE, SETTINGS, (NULL), ("Both proxy host and port must be specified or none")); return FALSE; } begin_req_failed: { - GST_ELEMENT_ERROR (src, LIBRARY, INIT, + GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL), ("Could not begin request (%i)", res)); return FALSE; }