mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Merge tilghman's meetme fix for reentering pin (bug #2143)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1324,8 +1324,11 @@ static int conf_exec(struct ast_channel *chan, void *data)
|
|||||||
confno[0] = '\0';
|
confno[0] = '\0';
|
||||||
} else {
|
} else {
|
||||||
if (!ast_strlen_zero(cnf->pin)) {
|
if (!ast_strlen_zero(cnf->pin)) {
|
||||||
char pin[AST_MAX_EXTENSION];
|
char pin[AST_MAX_EXTENSION]="";
|
||||||
|
int j;
|
||||||
|
|
||||||
|
/* Allow the pin to be retried up to 3 times */
|
||||||
|
for (j=0; j<3; j++) {
|
||||||
if (*the_pin) {
|
if (*the_pin) {
|
||||||
strncpy(pin, the_pin, sizeof(pin) - 1);
|
strncpy(pin, the_pin, sizeof(pin) - 1);
|
||||||
res = 0;
|
res = 0;
|
||||||
@@ -1339,6 +1342,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
|
|||||||
allowretry = 0;
|
allowretry = 0;
|
||||||
/* Run the conference */
|
/* Run the conference */
|
||||||
res = conf_run(chan, cnf, confflags);
|
res = conf_run(chan, cnf, confflags);
|
||||||
|
break;
|
||||||
} else {
|
} else {
|
||||||
/* Pin invalid */
|
/* Pin invalid */
|
||||||
res = ast_streamfile(chan, "conf-invalidpin", chan->language);
|
res = ast_streamfile(chan, "conf-invalidpin", chan->language);
|
||||||
@@ -1351,6 +1355,13 @@ static int conf_exec(struct ast_channel *chan, void *data)
|
|||||||
} else {
|
} else {
|
||||||
res = -1;
|
res = -1;
|
||||||
allowretry = 0;
|
allowretry = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Don't retry pin with a static pin */
|
||||||
|
if (*the_pin) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* No pin required */
|
/* No pin required */
|
||||||
|
|||||||
Reference in New Issue
Block a user