diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-03-15 16:12:05 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2016-03-15 16:12:05 -0500 |
commit | ee369babc9185bac7c7910a68a1e58bab7efa64c (patch) | |
tree | bf1e33eab582e699515a59e9edd258765e6988b3 /src | |
parent | 670f6fd05bd49e58ea326656fe8f231df4685533 (diff) | |
download | ayatana-indicator-display-ee369babc9185bac7c7910a68a1e58bab7efa64c.tar.gz ayatana-indicator-display-ee369babc9185bac7c7910a68a1e58bab7efa64c.tar.bz2 ayatana-indicator-display-ee369babc9185bac7c7910a68a1e58bab7efa64c.zip |
oops, last commit's diagnosis was incorrect. The timing test issue came from async dbus handling interfering with fast setup/teardown of automated tests. Revert the last change and fix by setting up the dbus signal subscription immediately upon getting the dbus connection.
Diffstat (limited to 'src')
-rw-r--r-- | src/usb-snap.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/usb-snap.cpp b/src/usb-snap.cpp index 87f4673..c42f9f0 100644 --- a/src/usb-snap.cpp +++ b/src/usb-snap.cpp @@ -92,6 +92,17 @@ private: { m_bus = G_DBUS_CONNECTION(g_object_ref(G_OBJECT(bus))); + m_subscription_id = g_dbus_connection_signal_subscribe(m_bus, + BUS_NAME, + IFACE_NAME, + nullptr, + OBJECT_PATH, + nullptr, + G_DBUS_SIGNAL_FLAGS_NONE, + on_notification_signal_static, + this, + nullptr); + auto body = g_strdup_printf(_("The computer's RSA key fingerprint is: %s"), m_fingerprint.c_str()); GVariantBuilder actions_builder; @@ -151,17 +162,6 @@ private: void on_notify_reply(uint32_t id) { m_notification_id = id; - - m_subscription_id = g_dbus_connection_signal_subscribe(m_bus, - BUS_NAME, - IFACE_NAME, - nullptr, - OBJECT_PATH, - nullptr, - G_DBUS_SIGNAL_FLAGS_NONE, - on_notification_signal_static, - this, - nullptr); } static void on_notification_signal_static(GDBusConnection* /*connection*/, |