]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
channels: fix reentrancy guard in channel_class_changed()
authorOliver Sluke <22557015+oliversluke@users.noreply.github.com>
Thu, 23 Apr 2026 21:12:49 +0000 (23:12 +0200)
committerFlole <Flole998@users.noreply.github.com>
Fri, 24 Apr 2026 19:29:57 +0000 (21:29 +0200)
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.

src/channels.c

index 82adbe4485357beb3d0e60b0c42e77b689a218ca..5535b46e2e50b8cbf52f775ef77b68bd1799fb1e 100644 (file)
@@ -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 *