chiark / gitweb /
sd-bus: remove bus_remove_match_by_string() helper which is unused
authorLennart Poettering <lennart@poettering.net>
Mon, 18 Dec 2017 19:45:35 +0000 (20:45 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:49:57 +0000 (07:49 +0200)
src/libelogind/sd-bus/bus-internal.h
src/libelogind/sd-bus/sd-bus.c

index b0c519cf9246567583a53919dc2eac9e54b5b134..1047125e842424f6db82cb5bc5d2eb6b5fec583d 100644 (file)
@@ -401,9 +401,7 @@ int bus_set_address_system_remote(sd_bus *b, const char *host);
 int bus_set_address_system_machine(sd_bus *b, const char *machine);
 
 #if 0 /// UNNEEDED by elogind
-int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata);
 #endif // 0
-
 int bus_get_root_path(sd_bus *bus);
 
 int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error);
index d90cefd317115962e9df8650ab7ae2f2438c8dbd..a73924b6e1f138f7984b0d863a252405446c7835 100644 (file)
@@ -3020,38 +3020,7 @@ finish:
 }
 
 #if 0 /// UNNEEDED by elogind
-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;
-}
 #endif // 0
-
 bool bus_pid_changed(sd_bus *bus) {
         assert(bus);