+2007-03-01 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * ext/hal/gsthalaudiosink.c: (do_toggle_element):
+ * ext/hal/gsthalaudiosrc.c: (do_toggle_element):
+ Check if the device UDI is set before trying to query HAL
+ about it and give a useful error message if it wasn't set.
+ * ext/hal/hal.c: (gst_hal_get_string):
+ Don't query HAL for NULL UDIs. Passing NULL as UDI to HAL
+ gives an assertion failure in D-Bus when running with
+ DBUS_FATAL_WARNINGS=1.
+
2007-02-28 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:
-Subproject commit 54c2a701c28dcddaf051abf09a360223acd096c9
+Subproject commit 9a56e28fc15440eb6852411321c46312e1d1bb73
}
GST_DEBUG_OBJECT (sink, "Creating new kid");
- if (!(sink->kid = gst_hal_get_audio_sink (sink->udi))) {
+ if (!sink->udi) {
+ GST_ELEMENT_ERROR (sink, LIBRARY, SETTINGS, (NULL),
+ ("No UDI set for device"));
+ return FALSE;
+ } else if (!(sink->kid = gst_hal_get_audio_sink (sink->udi))) {
GST_ELEMENT_ERROR (sink, LIBRARY, SETTINGS, (NULL),
("Failed to render audio sink from Hal"));
return FALSE;
}
GST_DEBUG_OBJECT (src, "Creating new kid");
- if (!(src->kid = gst_hal_get_audio_src (src->udi))) {
+ if (!src->udi) {
+ GST_ELEMENT_ERROR (src, LIBRARY, SETTINGS, (NULL),
+ ("No UDI set for device"));
+ return FALSE;
+ } else if (!(src->kid = gst_hal_get_audio_src (src->udi))) {
GST_ELEMENT_ERROR (src, LIBRARY, SETTINGS, (NULL),
("Failed to render audio source from Hal"));
return FALSE;
LibHalContext *ctx;
char *string;
+ /* Don't query HAL for NULL UDIs. Passing NULL as UDI to HAL gives
+ * an assertion failure in D-Bus when running with
+ * DBUS_FATAL_WARNINGS=1. */
+ if (!udi)
+ return NULL;
+
dbus_error_init (&error);
connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);