From 3cd54aacd8fa385480c1075dd2b4411b27498b13 Mon Sep 17 00:00:00 2001 From: Jeremie Leska Date: Wed, 13 Sep 2023 14:41:25 +0200 Subject: [PATCH] udp-notif UPDATE fix bad subscription id --- src/netconf_subscribed_notifications.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netconf_subscribed_notifications.c b/src/netconf_subscribed_notifications.c index 03e48ee4..2c431782 100644 --- a/src/netconf_subscribed_notifications.c +++ b/src/netconf_subscribed_notifications.c @@ -1688,7 +1688,7 @@ sub_ntf_terminate_sub(struct np2srv_sub_ntf *sub, struct nc_session *ncs) sub_id_count = ATOMIC_LOAD_RELAXED(sub->sub_id_count); for (idx = 0; idx < sub_id_count; ++idx) { /* pass the lock to the notification CB, which removes its sub ID, the final one the whole sub */ - sub_id = sub->sub_ids[0]; + sub_id = sub->sub_ids[idx]; sub_ntf_cb_lock_pass(sub_id); if (ncs) { r = sr_unsubscribe_sub(np2srv.sr_notif_sub, sub_id);