]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
MeetMe requests a PIN twice in some circumstances
authorKinsey Moore <kmoore@digium.com>
Tue, 19 Jul 2011 15:43:32 +0000 (15:43 +0000)
committerKinsey Moore <kmoore@digium.com>
Tue, 19 Jul 2011 15:43:32 +0000 (15:43 +0000)
If a call to MeetMe includes both the dynamic(D) and always request PIN(P)
options, MeetMe will ask for the PIN two times: once for creating the
conference and once for entering the conference.  This behavior was introduced
in rev 311616 when adding the CONFFLAG_ALWAYSPROMPT option to the logic branch
controlling PIN entry for joining a conference.

(closes AST-601)
Review: https://reviewboard.asterisk.org/r/1305/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@328770 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_meetme.c

index 1d68e2617c295e96d52caf889cc49684da934225..adcc7c36a22826a41abfb2edb2edfbcfafc4039e 100644 (file)
@@ -4333,15 +4333,13 @@ static int conf_exec(struct ast_channel *chan, const char *data)
                                        res = -1;
                                }
                        } else {
-                               if (((!ast_strlen_zero(cnf->pin)       &&
-                                       !ast_test_flag64(&confflags, CONFFLAG_ADMIN)) ||
-                                    (!ast_strlen_zero(cnf->pinadmin)  &&
-                                                ast_test_flag64(&confflags, CONFFLAG_ADMIN)) ||
-                                            (!ast_strlen_zero(cnf->pin) &&
-                                                        ast_strlen_zero(cnf->pinadmin) &&
-                                                        ast_test_flag64(&confflags, CONFFLAG_ADMIN))) &&
-                                   ((!(cnf->users == 0 && cnf->isdynamic)) ||
-                                               ast_test_flag64(&confflags, CONFFLAG_ALWAYSPROMPT))) {
+                               /* Check to see if the conference requires a pin
+                                * and we ALWAYS prompt or no pin was provided */
+                               if ((!ast_strlen_zero(cnf->pin) ||
+                                       (!ast_strlen_zero(cnf->pinadmin) &&
+                                               ast_test_flag64(&confflags, CONFFLAG_ADMIN))) &&
+                                   (ast_test_flag64(&confflags, CONFFLAG_ALWAYSPROMPT) ||
+                                               ast_strlen_zero(args.pin))) {
                                        char pin[MAX_PIN] = "";
                                        int j;