mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 07:18:15 +00:00
Allow you to enter the pin again during th "invalid pin" message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1334,7 +1334,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
|
|||||||
res = 0;
|
res = 0;
|
||||||
} else {
|
} else {
|
||||||
/* Prompt user for pin if pin is required */
|
/* Prompt user for pin if pin is required */
|
||||||
res = ast_app_getdata(chan, "conf-getpin", pin, sizeof(pin) - 1, 0);
|
res = ast_app_getdata(chan, "conf-getpin", pin + strlen(pin), sizeof(pin) - 1 - strlen(pin), 0);
|
||||||
}
|
}
|
||||||
if (res >= 0) {
|
if (res >= 0) {
|
||||||
if (!strcasecmp(pin, cnf->pin)) {
|
if (!strcasecmp(pin, cnf->pin)) {
|
||||||
@@ -1347,7 +1347,11 @@ static int conf_exec(struct ast_channel *chan, void *data)
|
|||||||
/* Pin invalid */
|
/* Pin invalid */
|
||||||
res = ast_streamfile(chan, "conf-invalidpin", chan->language);
|
res = ast_streamfile(chan, "conf-invalidpin", chan->language);
|
||||||
if (!res)
|
if (!res)
|
||||||
ast_waitstream(chan, "");
|
ast_waitstream(chan, AST_DIGIT_ANY);
|
||||||
|
if (res < 0)
|
||||||
|
break;
|
||||||
|
pin[0] = res;
|
||||||
|
pin[1] = '\0';
|
||||||
res = -1;
|
res = -1;
|
||||||
if (allowretry)
|
if (allowretry)
|
||||||
confno[0] = '\0';
|
confno[0] = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user