From: Oliver Sluke <22557015+oliversluke@users.noreply.github.com> Date: Thu, 23 Apr 2026 21:12:49 +0000 (+0200) Subject: channels: fix reentrancy guard in channel_class_changed() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cb0b87cf07b5a29db09c0cc5b9976bb31cd0332;p=thirdparty%2Ftvheadend.git channels: fix reentrancy guard in channel_class_changed() atomic_dec(&ch->ch_changed_ref, 0) subtracts 0 instead of 1, so the reentrancy counter never resets after the first call. All subsequent calls see atomic_add() > 0 and return early, permanently suppressing HTSP channelUpdate notifications, bouquet propagation, and tag updates for that channel. Fix by decrementing by 1 so the guard properly resets to 0. --- diff --git a/src/channels.c b/src/channels.c index 82adbe448..5535b46e2 100644 --- a/src/channels.c +++ b/src/channels.c @@ -92,7 +92,7 @@ channel_class_changed ( idnode_t *self ) htsp_channel_update(ch); end: - atomic_dec(&ch->ch_changed_ref, 0); + atomic_dec(&ch->ch_changed_ref, 1); } static htsmsg_t *