summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
429266b)
success return, any negative number is a failure. Make sure we check
the return value with that in mind.
BIO_snprintf(buf, sizeof(buf)-1,
"Current card: \"%s\"\n", wrong_info);
ok = UI_dup_info_string(ui, buf);
BIO_snprintf(buf, sizeof(buf)-1,
"Current card: \"%s\"\n", wrong_info);
ok = UI_dup_info_string(ui, buf);
+ if (ok >= 0 && prompt_info)
{
BIO_snprintf(buf, sizeof(buf)-1,
"Insert card \"%s\"\n then hit <enter> or C<enter> to cancel\n", prompt_info);
{
BIO_snprintf(buf, sizeof(buf)-1,
"Insert card \"%s\"\n then hit <enter> or C<enter> to cancel\n", prompt_info);
answer, 0, sizeof(answer)-1);
}
UI_add_user_data(ui, callback_data);
answer, 0, sizeof(answer)-1);
}
UI_add_user_data(ui, callback_data);
ok = UI_process(ui);
UI_free(ui);
/* If canceled input treat as 'cancel' */
if (ok == -2)
ok = 1;
ok = UI_process(ui);
UI_free(ui);
/* If canceled input treat as 'cancel' */
if (ok == -2)
ok = 1;
ok = -1;
else if (answer[0] == 'c' || answer[0] == 'C')
ok = 1;
ok = -1;
else if (answer[0] == 'c' || answer[0] == 'C')
ok = 1;