diff --git a/CHANGES.md b/CHANGES.md index b7fd955e..8317fa8e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ Changes in v1.4.9 (YYYY-MM-DD) - Fixed a bug in job event notifications. - Fixed a bug that would delay shutdown by 60 seconds. +- Fixed some notification bugs. Changes in v1.4.8 (2024-11-14) diff --git a/pappl/subscription.c b/pappl/subscription.c index 82e72eb1..98319371 100644 --- a/pappl/subscription.c +++ b/pappl/subscription.c @@ -1,7 +1,7 @@ // // System event subscription functions for the Printer Application Framework // -// Copyright © 2022-2024 by Michael R Sweet. +// Copyright © 2022-2025 by Michael R Sweet. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. @@ -142,7 +142,8 @@ papplSubscriptionCreate( if (data && datalen > 0) ippAddOctetString(sub->attrs, IPP_TAG_SUBSCRIPTION, "notify-user-data", data, (cups_len_t)datalen); - sub->events = cupsArrayNew(NULL, NULL, NULL, 0, NULL, (cups_afree_cb_t)ippDelete); + sub->first_sequence = 1; + sub->events = cupsArrayNew(NULL, NULL, NULL, 0, NULL, (cups_afree_cb_t)ippDelete); return (sub); } diff --git a/pappl/system-printer.c b/pappl/system-printer.c index eba7d1bd..857d94ee 100644 --- a/pappl/system-printer.c +++ b/pappl/system-printer.c @@ -1,7 +1,7 @@ // -// Printer object for the Printer Application Framework +// System functions on printers for the Printer Application Framework // -// Copyright © 2019-2023 by Michael R Sweet. +// Copyright © 2019-2025 by Michael R Sweet. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. @@ -50,7 +50,8 @@ _papplSystemAddPrinter( _papplRWUnlock(system); _papplSystemConfigChanged(system); - papplSystemAddEvent(system, printer, NULL, PAPPL_EVENT_PRINTER_CREATED | PAPPL_EVENT_SYSTEM_CONFIG_CHANGED, NULL); + papplSystemAddEvent(system, printer, NULL, PAPPL_EVENT_PRINTER_CREATED, NULL); + papplSystemAddEvent(system, printer, NULL, PAPPL_EVENT_SYSTEM_CONFIG_CHANGED, NULL); }