From e33cd6bf278baabcb5afc03b52cd3633599a9833 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 f8689be4..db31c919 100644 --- a/src/netconf_subscribed_notifications.c +++ b/src/netconf_subscribed_notifications.c @@ -1672,7 +1672,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);