Add auto subscribe support
authorJohn Crispin <john@phrozen.org>
Mon, 13 Nov 2023 13:53:19 +0000 (14:53 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 14 Nov 2023 21:29:04 +0000 (22:29 +0100)
commitb3e8c4ef07ebb6f0f34a5c1f0dc1539068363619
tree730db1a83df1b6474d356c2ab922109b519030ad
parentf787c97b34894a38b15599886cacbca01271684f
Add auto subscribe support

Add a new property to ubus_subscriber called new_obj_cb. It gets called
everytime a new object appears on the bus. If the callback returns true,
libubus will automatically subscribe to the notifications.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
libubus-sub.c
libubus.c
libubus.h