[network-manager-applet] applet: don't call nm_secret_agent_register() when the agent is registered
- From: JiÅÃ KlimeÅ <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] applet: don't call nm_secret_agent_register() when the agent is registered
- Date: Tue, 20 Mar 2012 10:40:00 +0000 (UTC)
commit 7f817a46c7bd7551eb16fce2970e8a3da3b69518
Author: JiÅÃ KlimeÅ <jklimes redhat com>
Date: Tue Mar 20 10:55:12 2012 +0100
applet: don't call nm_secret_agent_register() when the agent is registered
There was a race while running without GnomeShell. delayed_start_agent() was
scheduled but by the time it was run the agent had been auto-registered and
nm_secret_agent_register() in delayed_start_agent() asserted.
src/applet.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 197b8cf..8ef5a29 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -3220,6 +3220,11 @@ delayed_start_agent (gpointer user_data)
applet->agent_start_id = 0;
g_assert (applet->agent);
+
+ /* If the agent is already running, there's nothing to do. */
+ if (nm_secret_agent_get_registered (NM_SECRET_AGENT (applet->agent)) == TRUE)
+ return FALSE;
+
if (nm_secret_agent_register (NM_SECRET_AGENT (applet->agent)))
g_message ("Starting applet secret agent because GNOME Shell disappeared");
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]