Skip to content

Commit

Permalink
Mirror subscription fixes from master.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Jan 19, 2025
1 parent 734a1ac commit 32b6151
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions pappl/subscription.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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);
}
Expand Down
7 changes: 4 additions & 3 deletions pappl/system-printer.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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);
}


Expand Down

0 comments on commit 32b6151

Please sign in to comment.