There sd-bus.hare several APIs in the systemd file that optionally take an argument slot. Here are some examples:
int sd_bus_call_async(sd_bus *bus, sd_bus_slot **slot, sd_bus_message *m, sd_bus_message_handler_t callback, void *userdata, uint64_t usec);
int sd_bus_add_filter(sd_bus *bus, sd_bus_slot **slot, sd_bus_message_handler_t callback, void *userdata);
int sd_bus_add_fallback(sd_bus *bus, sd_bus_slot **slot, const char *prefix, sd_bus_message_handler_t callback, void *userdata);
If the calling code indicates NULL, then it becomes a "floating slot", which, I believe, means that the calling code does not need to worry about it.
Basically, the source code example that I see looks like this example: https://github.com/tasleson/dbus-signals/blob/6d0e43d02d24ed51a17ce7df15a3a0a64ec0170d/spamsignals.c#L160
A slot is required, and then after a while it does not remove the slot. But in fact, he does nothing with it.
source
share