[network-manager-applet] gsm: give PIN/PUK more time



commit 637e4bd0e63b1a29df2672f3f05f71546b8b0687
Author: Dan Williams <dcbw redhat com>
Date:   Wed Sep 1 17:47:21 2010 -0500

    gsm: give PIN/PUK more time
    
    Sometimes it just takes longer, especially when we need to requery
    the PIN status in MM and some modems don't do that quickly.

 src/applet-device-gsm.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/src/applet-device-gsm.c b/src/applet-device-gsm.c
index b9e256c..184297a 100644
--- a/src/applet-device-gsm.c
+++ b/src/applet-device-gsm.c
@@ -913,9 +913,11 @@ unlock_dialog_response (GtkDialog *dialog,
 
 	/* Send the code to ModemManager */
 	if (unlock_code == UNLOCK_CODE_PIN) {
-		dbus_g_proxy_begin_call (info->card_proxy, "SendPin",
-		                         unlock_pin_reply, info, NULL,
-		                         G_TYPE_STRING, code1, G_TYPE_INVALID);
+		dbus_g_proxy_begin_call_with_timeout (info->card_proxy, "SendPin",
+		                                      unlock_pin_reply, info, NULL,
+		                                      12000,  /* 12 seconds */
+		                                      G_TYPE_STRING, code1,
+		                                      G_TYPE_INVALID);
 	} else if (unlock_code == UNLOCK_CODE_PUK) {
 		code2 = applet_mobile_pin_dialog_get_entry2 (info->dialog);
 		if (!code2) {
@@ -924,11 +926,12 @@ unlock_dialog_response (GtkDialog *dialog,
 			return;
 		}
 
-		dbus_g_proxy_begin_call (info->card_proxy, "SendPuk",
-		                         unlock_puk_reply, info, NULL,
-		                         G_TYPE_STRING, code1,
-		                         G_TYPE_STRING, code2,
-		                         G_TYPE_INVALID);
+		dbus_g_proxy_begin_call_with_timeout (info->card_proxy, "SendPuk",
+		                                      unlock_puk_reply, info, NULL,
+		                                      12000,  /* 12 seconds */
+		                                      G_TYPE_STRING, code1,
+		                                      G_TYPE_STRING, code2,
+		                                      G_TYPE_INVALID);
 	}
 }
 



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