From a277302b1c1c2568c456abcb3432eb8f8ead0925 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 27 Apr 2016 10:22:00 +0200 Subject: choosing an action in the snap decision closes the notification, so when that happens clear our notification_id s.t. our dtor doesn't try to remove a notification that no longer exists --- src/usb-snap.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/usb-snap.cpp b/src/usb-snap.cpp index 2b5424d..629898b 100644 --- a/src/usb-snap.cpp +++ b/src/usb-snap.cpp @@ -212,6 +212,8 @@ g_message("%s got signal %s with parameters %s", G_STRLOC, signal_name, g_varian const bool remember_this_choice = response == AdbdClient::PKResponse::ALLOW; m_on_user_response(response, remember_this_choice); +g_message("%s clearing m_notification_id", G_STRLOC); + m_notification_id = 0; } void on_notification_closed(uint32_t close_reason) @@ -220,7 +222,7 @@ g_message("%s closed with reason %d", G_STRLOC, int(close_reason)); if (close_reason == DBusNames::Notify::NotificationClosed::Reason::EXPIRED) m_on_user_response(AdbdClient::PKResponse::DENY, false); -g_message("%s setting m_notification_id to 0", G_STRLOC); +g_message("%s clearing m_notification_id", G_STRLOC); m_notification_id = 0; } -- cgit v1.2.3