[network-manager-applet/rm-userset] applet: print agent registration errors



commit c03825cb3e8fd2d0d7c72ebc1ab755dd5d640603
Author: Dan Williams <dcbw redhat com>
Date:   Wed Jan 19 17:25:49 2011 -0600

    applet: print agent registration errors

 src/applet-agent.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/applet-agent.c b/src/applet-agent.c
index e342e5f..1d462fb 100644
--- a/src/applet-agent.c
+++ b/src/applet-agent.c
@@ -612,11 +612,21 @@ applet_agent_new (void)
 }
 
 static void
+agent_registration_result_cb (NMSecretAgent *agent, GError *error, gpointer user_data)
+{
+	if (error)
+		g_warning ("Failed to register as an agent: (%d) %s", error->code, error->message);
+}
+
+static void
 applet_agent_init (AppletAgent *self)
 {
 	AppletAgentPrivate *priv = APPLET_AGENT_GET_PRIVATE (self);
 
 	priv->requests = g_hash_table_new (g_direct_hash, g_direct_equal);
+
+	g_signal_connect (self, NM_SECRET_AGENT_REGISTRATION_RESULT,
+	                  G_CALLBACK (agent_registration_result_cb), NULL);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]