bus-slot.c revision cc65fe5e14770d0116e0f475c5dc2ef57113bc98
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier This file is part of systemd.
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier Copyright 2013 Lennart Poettering
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier systemd is free software; you can redistribute it and/or modify it
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier under the terms of the GNU Lesser General Public License as published by
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier the Free Software Foundation; either version 2.1 of the License, or
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier (at your option) any later version.
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier systemd is distributed in the hope that it will be useful, but
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier WITHOUT ANY WARRANTY; without even the implied warranty of
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier Lesser General Public License for more details.
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier You should have received a copy of the GNU Lesser General Public License
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier along with systemd; If not, see <http://www.gnu.org/licenses/>.
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier slot = malloc0(offsetof(sd_bus_slot, reply_callback) + extra);
2b89a960604d44ea1483c0d99bfb567dab9c3aa1Ronny Chevalier_public_ sd_bus_slot* sd_bus_slot_ref(sd_bus_slot *slot) {
return slot;
case BUS_REPLY_CALLBACK:
prioq_remove(slot->bus->reply_callbacks_prioq, &slot->reply_callback, &slot->reply_callback.prioq_idx);
case BUS_FILTER_CALLBACK:
case BUS_MATCH_CALLBACK:
bus_remove_match_internal(slot->bus, slot->match_callback.match_string, slot->match_callback.cookie);
case BUS_NODE_CALLBACK:
case BUS_NODE_ENUMERATOR:
case BUS_NODE_OBJECT_MANAGER:
LIST_REMOVE(object_managers, slot->node_object_manager.node->object_managers, &slot->node_object_manager);
case BUS_NODE_VTABLE:
const sd_bus_vtable *v;
switch (v->type) {
case _SD_BUS_VTABLE_METHOD: {
case _SD_BUS_VTABLE_PROPERTY:
case _SD_BUS_VTABLE_WRITABLE_PROPERTY: {
free(x);
if (!slot)
return NULL;
return NULL;
return NULL;
void *ret;
return ret;
return NULL;
return NULL;
return NULL;