From 042d60b67ff7af55cc0f7aceb179ce3cf4f8720b Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 28 Apr 2010 23:03:26 +0000 Subject: [PATCH] Clear the code entry when re-requested --- src/phone.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/phone.c b/src/phone.c index 8c1d46c..c41602b 100644 --- a/src/phone.c +++ b/src/phone.c @@ -848,7 +848,10 @@ static int _gsm_event_error(Phone * phone, GSMEvent * event) { if(event->error.error == GSM_ERROR_SIM_PIN_REQUIRED || event->error.error == GSM_ERROR_SIM_PIN_WRONG) + { + phone_code_clear(phone); phone_show_code(phone, TRUE, PHONE_CODE_SIM_PIN); + } else if(event->error.error == GSM_ERROR_CONTACT_LIST_FAILED || event->error.error == GSM_ERROR_MESSAGE_LIST_FAILED) return 0; /* XXX report this error */