]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix pin parameter behavior regression in MeetMe
authorKinsey Moore <kmoore@digium.com>
Wed, 9 Nov 2011 17:13:53 +0000 (17:13 +0000)
committerKinsey Moore <kmoore@digium.com>
Wed, 9 Nov 2011 17:13:53 +0000 (17:13 +0000)
The last time this code was touched (by me), a subtlety was missed based on the
difference between needing to check a pin's validity and the need to prompt
for a pin.

(closes issue ASTERISK-18488)

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

apps/app_meetme.c

index b7ec372d8bdf7a726c55e38aeb97afb905bf1087..c93adddaebcef05dd78b628e006ab2041ea08e84 100644 (file)
@@ -4342,13 +4342,14 @@ static int conf_exec(struct ast_channel *chan, const char *data)
                                        res = -1;
                                }
                        } else {
-                               /* Check to see if the conference requires a pin
-                                * and we ALWAYS prompt or no pin was provided */
+                               /* Check to see if the conference requires pin
+                                * validation and check for exemptions to that
+                                * requirement. */
                                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))) {
+                                               ast_strlen_zero(args.pin) || !cnf->isdynamic)) {
                                        char pin[MAX_PIN] = "";
                                        int j;