gnokii-commit
[Top][All Lists]
Advanced

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

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-34


From: Pawel Kot
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-347-g97cfd69
Date: Sun, 25 Dec 2011 23:42:19 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  97cfd69cc017702507d4e644a522a2916de6b546 (commit)
      from  04addd4a8473e7f8e047e725728ceacb47ffb347 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=97cfd69cc017702507d4e644a522a2916de6b546


commit 97cfd69cc017702507d4e644a522a2916de6b546
Author: Pawel Kot <address@hidden>
Date:   Mon Dec 26 00:41:09 2011 +0100

    Allow to cancel the interactive PIN entering
    
    Allow to cancel the interactive authentication process with an empty input.

diff --git a/common/gsm-auth.c b/common/gsm-auth.c
index 85a290e..f0c3d89 100644
--- a/common/gsm-auth.c
+++ b/common/gsm-auth.c
@@ -57,28 +57,22 @@ static int get_password(const char *prompt, char *pass, int 
length)
 static gn_error auth_pin_interactive(gn_data *data, struct gn_statemachine 
*state)
 {
        gn_security_code *security_code = data->security_code;
+       char prompt[64];
 
        memset(&security_code->code, 0, sizeof(security_code->code));
        switch (security_code->type) {
        case GN_SCT_Pin:
-               get_password(_("Enter your PIN code: "), security_code->code, 
sizeof(security_code->code));
-               break;
        case GN_SCT_Puk:
-               get_password(_("Enter your PUK code: "), security_code->code, 
sizeof(security_code->code));
-               break;
        case GN_SCT_Pin2:
-               get_password(_("Enter your PIN2 code: "), security_code->code, 
sizeof(security_code->code));
-               break;
        case GN_SCT_Puk2:
-               get_password(_("Enter your PUK2 code: "), security_code->code, 
sizeof(security_code->code));
-               break;
        case GN_SCT_SecurityCode:
-               get_password(_("Enter your security code: "), 
security_code->code, sizeof(security_code->code));
+               snprintf(prompt, sizeof(prompt), _("Enter your %s (press Enter 
to cancel): "), gn_security_code_type2str(security_code->type));
+               if (get_password(prompt, security_code->code, 
sizeof(security_code->code)) < 1)
+                       return GN_ERR_USERCANCELED;
                break;
        default:
                return GN_ERR_NOTSUPPORTED;
        }
-
        return gn_sm_functions(GN_OP_EnterSecurityCode, data, state);
 }
 

-----------------------------------------------------------------------

Summary of changes:
 common/gsm-auth.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]