mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-14 06:59:57 -05:00
pw-reserve: require valid name + check rd_reserve_new errors
Empty name in rd_device_new triggers assert inside DBus, so bail out before that.
This commit is contained in:
parent
422c270a74
commit
b12119da28
3 changed files with 44 additions and 2 deletions
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <dbus/dbus.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -51,6 +52,9 @@ void rd_device_release(struct rd_device *d);
|
|||
/** destroy a device */
|
||||
void rd_device_destroy(struct rd_device *d);
|
||||
|
||||
/** check if device name is a valid name */
|
||||
bool rd_device_valid_device_name(const char *name);
|
||||
|
||||
/* Set the application device name for an rd_device object. Returns 0
|
||||
* on success, a negative errno style return value on error. */
|
||||
int rd_device_set_application_device_name(struct rd_device *d, const char *name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue