[network-manager-applet] gsm: fix interpretation of unlock_required when no unlock is required
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] gsm: fix interpretation of unlock_required when no unlock is required
- Date: Thu, 4 Mar 2010 19:21:57 +0000 (UTC)
commit 8e1dedd6b96f5b87095b0caa1730f14ee7eab295
Author: Dan Williams <dcbw redhat com>
Date: Thu Mar 4 09:44:14 2010 -0800
gsm: fix interpretation of unlock_required when no unlock is required
src/applet-device-gsm.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/applet-device-gsm.c b/src/applet-device-gsm.c
index f1a6a22..f028278 100644
--- a/src/applet-device-gsm.c
+++ b/src/applet-device-gsm.c
@@ -1036,9 +1036,17 @@ unlock_reply (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
G_TYPE_VALUE, &value,
G_TYPE_INVALID)) {
if (G_VALUE_HOLDS_STRING (&value)) {
+ const char *new_val;
+
g_free (info->unlock_required);
- info->unlock_required = g_value_dup_string (&value);
+ info->unlock_required = NULL;
+
+ /* Empty string means NULL */
+ new_val = g_value_get_string (&value);
+ if (new_val && strlen (new_val))
+ info->unlock_required = g_strdup (new_val);
+ /* Show the unlock dialog if an unlock is now required */
if (info->unlock_required)
unlock_dialog_new (info->device, info);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]