From: Felix Fietkau Date: Sun, 17 Mar 2013 02:11:35 +0000 (+0100) Subject: libubus: add ubus_unregister_subscriber wrapper X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3b66d054ccf6474baee2033290db3179160fa95f;p=oweals%2Fubus.git libubus: add ubus_unregister_subscriber wrapper Signed-off-by: Felix Fietkau --- diff --git a/libubus.h b/libubus.h index bbed052..08f9c5b 100644 --- a/libubus.h +++ b/libubus.h @@ -227,6 +227,13 @@ int ubus_remove_object(struct ubus_context *ctx, struct ubus_object *obj); /* add a subscriber notifications from another object */ int ubus_register_subscriber(struct ubus_context *ctx, struct ubus_subscriber *obj); + +static inline int +ubus_unregister_subscriber(struct ubus_context *ctx, struct ubus_subscriber *obj) +{ + return ubus_remove_object(ctx, &obj->obj); +} + int ubus_subscribe(struct ubus_context *ctx, struct ubus_subscriber *obj, uint32_t id); int ubus_unsubscribe(struct ubus_context *ctx, struct ubus_subscriber *obj, uint32_t id);