summaryrefslogtreecommitdiffstats
path: root/ext/neon
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2008-09-17 14:22:38 +0000
committerTim-Philipp Müller <tim@centricular.net>2008-09-17 14:22:38 +0000
commit028352c5e00cfe63b78ea6f2be5b43dbfab6b889 (patch)
treef30ad182a66fd8fc1c27aea89849d468d90cbcce /ext/neon
parent6cc8ef3018beaae99bb5eb07d124c1efd85aa8c5 (diff)
downloadgst-plugins-bad-028352c5e00cfe63b78ea6f2be5b43dbfab6b889.tar.gz
gst-plugins-bad-028352c5e00cfe63b78ea6f2be5b43dbfab6b889.tar.bz2
gst-plugins-bad-028352c5e00cfe63b78ea6f2be5b43dbfab6b889.zip
ext/neon/gstneonhttpsrc.c: Don't post LIBRARY_INIT errors where we should be posting
Original commit message from CVS: * 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.
Diffstat (limited to 'ext/neon')
-rw-r--r--ext/neon/gstneonhttpsrc.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/ext/neon/gstneonhttpsrc.c b/ext/neon/gstneonhttpsrc.c
index 0ad6339d..49fc7199 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;
}