diff options
| author | Christian Hopps <chopps@labn.net> | 2024-02-12 13:03:32 -0500 |
|---|---|---|
| committer | Christian Hopps <chopps@gmail.com> | 2024-02-15 13:03:25 -0500 |
| commit | 1d4ea437e4a4fced3fce6e441952fdea8d94af80 (patch) | |
| tree | 13b4dd8966c63068657f948b753e35c6858447c9 /lib/northbound.h | |
| parent | fa67c0b91c085d40015e782838f7d5eaf82737e9 (diff) | |
lib: always call new notification hooks too
- call the new notification hooks when backends call the old notification
posting API.
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound.h')
| -rw-r--r-- | lib/northbound.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/northbound.h b/lib/northbound.h index e9f2db9b6e..5be111cf0a 100644 --- a/lib/northbound.h +++ b/lib/northbound.h @@ -803,6 +803,8 @@ typedef enum nb_error (*nb_oper_data_finish_cb)(const struct lyd_node *tree, /* Hooks. */ DECLARE_HOOK(nb_notification_send, (const char *xpath, struct list *arguments), (xpath, arguments)); +DECLARE_HOOK(nb_notification_tree_send, + (const char *xpath, const struct lyd_node *tree), (xpath, tree)); DECLARE_HOOK(nb_client_debug_config_write, (struct vty *vty), (vty)); DECLARE_HOOK(nb_client_debug_set_all, (uint32_t flags, bool set), (flags, set)); @@ -1491,14 +1493,17 @@ extern int nb_notification_send(const char *xpath, struct list *arguments); * Send a YANG notification from a backend . This is a no-op unless th * 'nb_notification_tree_send' hook was registered by a northbound plugin. * + * xpath + * XPath of the YANG notification. + * * tree - * The libyang tree for the notification. The tree will be freed by - * this call. + * The libyang tree for the notification. * * Returns: * NB_OK on success, NB_ERR otherwise. */ -extern int nb_notification_tree_send(struct lyd_node *tree); +extern int nb_notification_tree_send(const char *xpath, + const struct lyd_node *tree); /* * Associate a user pointer to a configuration node. |
