sd-bus: remove bus_remove_match_by_string() helper which is unused

This commit is contained in:
Lennart Poettering
2018-01-05 13:58:32 +01:00
parent 0259b87f5e
commit aec7b7bae7
2 changed files with 0 additions and 33 deletions
-2
View File
@@ -396,8 +396,6 @@ int bus_set_address_user(sd_bus *bus);
int bus_set_address_system_remote(sd_bus *b, const char *host);
int bus_set_address_system_machine(sd_bus *b, const char *machine);
int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata);
int bus_get_root_path(sd_bus *bus);
int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error);
-31
View File
@@ -3004,37 +3004,6 @@ finish:
return r;
}
int bus_remove_match_by_string(
sd_bus *bus,
const char *match,
sd_bus_message_handler_t callback,
void *userdata) {
struct bus_match_component *components = NULL;
unsigned n_components = 0;
struct match_callback *c;
int r = 0;
assert_return(bus, -EINVAL);
assert_return(match, -EINVAL);
assert_return(!bus_pid_changed(bus), -ECHILD);
r = bus_match_parse(match, &components, &n_components);
if (r < 0)
goto finish;
r = bus_match_find(&bus->match_callbacks, components, n_components, NULL, NULL, &c);
if (r <= 0)
goto finish;
sd_bus_slot_unref(container_of(c, sd_bus_slot, match_callback));
finish:
bus_match_parse_free(components, n_components);
return r;
}
bool bus_pid_changed(sd_bus *bus) {
assert(bus);