HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

src/home/homed-home-bus.c

31,972 bytesGit mode 100644Download original fileLGPL-2.1-or-later

Git blob: ec26b63f1dd5a31c7d76d5358346b449fc713180

Lines 1001–1035 of 1,035

        r = sd_event_source_set_priority(h->deferred_change_event_source, SD_EVENT_PRIORITY_IDLE+5);
        if (r < 0)
                log_warning_errno(r, "Failed to tweak priority of event source, ignoring: %m");
 
        (void) sd_event_source_set_description(h->deferred_change_event_source, "deferred-change-event");
        return 1;
}
 
int bus_home_emit_remove(Home *h) {
        _cleanup_free_ char *path = NULL;
        int r;
 
        assert(h);
 
        if (!h->announced)
                return 0;
 
        if (!h->manager)
                return 0;
 
        if (!h->manager->bus)
                return 0;
 
        r = bus_home_path(h, &path);
        if (r < 0)
                return r;
 
        r = sd_bus_emit_object_removed(h->manager->bus, path);
        if (r < 0)
                return r;
 
        h->announced = false;
        return 1;
}