[pulseaudio-discuss] [PATCH] device-manager: Don't allow setting an empty description in the client API
Tanu Kaskinen
tanu.kaskinen at linux.intel.com
Tue Aug 12 02:48:22 PDT 2014
The module implementation treats an empty description as a protocol
error, so we should validate the description already at client side.
---
src/pulse/ext-device-manager.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/pulse/ext-device-manager.c b/src/pulse/ext-device-manager.c
index 7fbb7de..9158068 100644
--- a/src/pulse/ext-device-manager.c
+++ b/src/pulse/ext-device-manager.c
@@ -225,6 +225,7 @@ pa_operation *pa_ext_device_manager_set_device_description(
PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED);
PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 14, PA_ERR_NOTSUPPORTED);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, *description, PA_ERR_INVALID);
o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
--
1.9.3
More information about the pulseaudio-discuss
mailing list