Hi, all

    I wonder why  the sd_bus_slot_unref() always returns NULL?  I expect that I 
can check whether the slot->n_ref ==0 by checking its return value.
That is


    _public_ sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot) {

        if (!slot)
                return NULL;

        assert(slot->n_ref > 0);

        if (slot->n_ref > 1) {
                slot->n_ref --;

                //return NULL;
               retrun slot;       
      }

        bus_slot_disconnect(slot);
        free(slot->description);
        free(slot);

        return NULL;

}


 As the libsystem doesn't provide some API for the application to get the n_ref 
from the sd_bus_slot,  maybe we can provide the same feature this way?


Thanks!


Li Cheng
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to