From 0142eeb58e0d718b7d2e1f0d5dd214bd2192cc7f Mon Sep 17 00:00:00 2001
From: Michael R Sweet <msweet@msweet.org>
Date: Sun, 5 Apr 2026 11:33:23 -0400
Subject: [PATCH] Expire per-printer subscriptions before deleting.

---
 CHANGES.md           | 1 +
 scheduler/printers.c | 6 ++++++
 2 files changed, 7 insertions(+)

#diff --git a/CHANGES.md b/CHANGES.md
#index a77886f21..f12759493 100644
#--- a/CHANGES.md
#+++ b/CHANGES.md
#@@ -35,6 +35,7 @@ Changes in CUPS v2.4.17 (YYYY-MM-DD)
# - Fixed a crash bug in the rastertoepson filter.
# - Fixed the range check for job password strings.
# - Fixed a bug in cgiCheckVariables.
#+- Fixed a printer subscription bug in the scheduler.
# 
# 
# Changes in CUPS v2.4.16 (2025-12-04)
--- a/scheduler/printers.c
+++ b/scheduler/printers.c
@@ -751,6 +751,12 @@ cupsdDeletePrinter(
 		              "Job stopped.");
 
  /*
+  * Expire subscriptions on the printer...
+  */
+
+  cupsdExpireSubscriptions(p, /*job*/NULL);
+
+ /*
   * Remove the printer from the list...
   */
 
