mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
dbus: Give NULL as the error parameter to dbus_bus_remove_match().
We didn't do anything anyway in case of failures. When we give NULL as the error, dbus_bus_remove_match() can act asynchronously, so it becomes faster. Also, the bus daemon can avoid sending any replies, which reduces the amount of traffic.
This commit is contained in:
parent
6450ac2e6a
commit
7e4eef2179
2 changed files with 6 additions and 16 deletions
|
|
@ -367,13 +367,8 @@ fail:
|
|||
va_end(ap);
|
||||
va_start(ap, error);
|
||||
for (; k > 0; k--) {
|
||||
DBusError e;
|
||||
|
||||
pa_assert_se(t = va_arg(ap, const char*));
|
||||
|
||||
dbus_error_init(&e);
|
||||
dbus_bus_remove_match(c, t, &e);
|
||||
dbus_error_free(&e);
|
||||
dbus_bus_remove_match(c, t, NULL);
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
|
|
@ -383,17 +378,12 @@ fail:
|
|||
void pa_dbus_remove_matches(DBusConnection *c, ...) {
|
||||
const char *t;
|
||||
va_list ap;
|
||||
DBusError error;
|
||||
|
||||
pa_assert(c);
|
||||
|
||||
dbus_error_init(&error);
|
||||
|
||||
va_start(ap, c);
|
||||
while ((t = va_arg(ap, const char*))) {
|
||||
dbus_bus_remove_match(c, t, &error);
|
||||
dbus_error_free(&error);
|
||||
}
|
||||
while ((t = va_arg(ap, const char*)))
|
||||
dbus_bus_remove_match(c, t, NULL);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue