mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
dbus: Handle the cases when a non-existing interface is detected in an incoming message.
This commit is contained in:
parent
4c793cfc76
commit
7b1b68ce2c
2 changed files with 9 additions and 0 deletions
|
|
@ -552,10 +552,18 @@ static DBusHandlerResult handle_message_cb(DBusConnection *connection, DBusMessa
|
||||||
pa_dbus_send_error(connection, message, DBUS_ERROR_UNKNOWN_METHOD, "No such method: %s", call_info.method);
|
pa_dbus_send_error(connection, message, DBUS_ERROR_UNKNOWN_METHOD, "No such method: %s", call_info.method);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NO_SUCH_INTERFACE:
|
||||||
|
pa_dbus_send_error(connection, message, PA_DBUS_ERROR_NO_SUCH_INTERFACE, "No such interface: %s", call_info.interface);
|
||||||
|
break;
|
||||||
|
|
||||||
case NO_SUCH_PROPERTY:
|
case NO_SUCH_PROPERTY:
|
||||||
pa_dbus_send_error(connection, message, PA_DBUS_ERROR_NO_SUCH_PROPERTY, "No such property: %s", call_info.property);
|
pa_dbus_send_error(connection, message, PA_DBUS_ERROR_NO_SUCH_PROPERTY, "No such property: %s", call_info.property);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NO_SUCH_PROPERTY_INTERFACE:
|
||||||
|
pa_dbus_send_error(connection, message, PA_DBUS_ERROR_NO_SUCH_INTERFACE, "No such property interface: %s", call_info.property_interface);
|
||||||
|
break;
|
||||||
|
|
||||||
case INVALID_METHOD_SIG:
|
case INVALID_METHOD_SIG:
|
||||||
pa_dbus_send_error(connection, message, DBUS_ERROR_INVALID_ARGS,
|
pa_dbus_send_error(connection, message, DBUS_ERROR_INVALID_ARGS,
|
||||||
"Invalid signature for method %s: '%s'. Expected '%s'.",
|
"Invalid signature for method %s: '%s'. Expected '%s'.",
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
#define PA_DBUS_CORE_INTERFACE "org.PulseAudio.Core1"
|
#define PA_DBUS_CORE_INTERFACE "org.PulseAudio.Core1"
|
||||||
#define PA_DBUS_CORE_OBJECT_PATH "/org/pulseaudio/core1"
|
#define PA_DBUS_CORE_OBJECT_PATH "/org/pulseaudio/core1"
|
||||||
|
|
||||||
|
#define PA_DBUS_ERROR_NO_SUCH_INTERFACE PA_DBUS_CORE_INTERFACE ".NoSuchInterfaceError"
|
||||||
#define PA_DBUS_ERROR_NO_SUCH_PROPERTY PA_DBUS_CORE_INTERFACE ".NoSuchPropertyError"
|
#define PA_DBUS_ERROR_NO_SUCH_PROPERTY PA_DBUS_CORE_INTERFACE ".NoSuchPropertyError"
|
||||||
#define PA_DBUS_ERROR_NOT_FOUND PA_DBUS_CORE_INTERFACE ".NotFoundError"
|
#define PA_DBUS_ERROR_NOT_FOUND PA_DBUS_CORE_INTERFACE ".NotFoundError"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue