[Bug 752866] souphttpsrc: check null string before setting proxy
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Jul 30 08:30:57 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=752866
Tim-Philipp Müller <t.i.m at zen.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |t.i.m at zen.co.uk
--- Comment #7 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
The earlier version with the early return is actually closer to GStreamer
style.
My thoughts on this:
a) We should just check for the empty string in gst_soup_http_src_init() where
we read the env var: if (proxy && *proxy && !set_proxy (...))
b) When setting the proxy via the GObject property, both NULL and an empty
string should be valid inputs and should lead to any existing proxy to be
unset. This means that the == NULL check in _set_property() is not right, it
should go into set_proxy() in any case, and set_proxy() should unset the old
proxy and then bail out if the string is NULL or empty.
c) We should either remove the return value from _set_proxy() entirely or
(better, IMHO) return (src->proxy != NULL) to check that soup_uri_new()
actually parsed the URI correctly. This is assuming soup_uri_new() actually
returns NULL on error.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list