Blame SOURCES/print-notifications-clear-in-stop.patch

e23cba
--- gnome-settings-daemon-40.0.1/plugins/print-notifications/gsd-print-notifications-manager.c
e23cba
+++ gnome-settings-daemon-40.0.1/plugins/print-notifications/gsd-print-notifications-manager.c
e23cba
@@ -1268,6 +1268,7 @@ scp_handler (GsdPrintNotificationsManage
e23cba
                 kill (manager->scp_handler_pid, SIGHUP);
e23cba
                 g_spawn_close_pid (manager->scp_handler_pid);
e23cba
                 manager->scp_handler_spawned = FALSE;
e23cba
+                manager->scp_handler_pid = -1;
e23cba
         }
e23cba
 }
e23cba
 
e23cba
@@ -1636,8 +1636,10 @@ gsd_print_notifications_manager_stop (Gs
e23cba
                 manager->check_source_id = 0;
e23cba
         }
e23cba
 
e23cba
-        if (manager->subscription_id >= 0)
e23cba
+        if (manager->subscription_id >= 0) {
e23cba
                 cancel_subscription (manager->subscription_id);
e23cba
+                manager->subscription_id = -1;
e23cba
+        }
e23cba
 
e23cba
         g_clear_pointer (&manager->printing_printers, g_hash_table_destroy);
e23cba
 
e23cba
@@ -1649,6 +1651,7 @@ gsd_print_notifications_manager_stop (Gs
e23cba
                         g_source_remove (data->timeout_id);
e23cba
         }
e23cba
         g_list_free_full (manager->timeouts, free_timeout_data);
e23cba
+        manager->timeouts = NULL;
e23cba
 
e23cba
         for (tmp = manager->active_notifications; tmp; tmp = g_list_next (tmp)) {
e23cba
                 reason_data = (ReasonData *) tmp->data;
e23cba
@@ -1665,12 +1668,14 @@ gsd_print_notifications_manager_stop (Gs
e23cba
                 }
e23cba
         }
e23cba
         g_list_free_full (manager->active_notifications, free_reason_data);
e23cba
+        manager->active_notifications = NULL;
e23cba
 
e23cba
         for (tmp = manager->held_jobs; tmp; tmp = g_list_next (tmp)) {
e23cba
                 job = (HeldJob *) tmp->data;
e23cba
                 g_source_remove (job->timeout_id);
e23cba
         }
e23cba
         g_list_free_full (manager->held_jobs, free_held_job);
e23cba
+        manager->held_jobs = NULL;
e23cba
 
e23cba
         scp_handler (manager, FALSE);
e23cba
 }