diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_meetme.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 2f64a9b78..38ada22a7 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -4298,9 +4298,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)) && + 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))) { char pin[MAX_PIN] = ""; int j; @@ -4315,9 +4319,11 @@ static int conf_exec(struct ast_channel *chan, const char *data) res = ast_app_getdata(chan, "conf-getpin", pin + strlen(pin), sizeof(pin) - 1 - strlen(pin), 0); } if (res >= 0) { - if (!strcasecmp(pin, cnf->pin) || - (!ast_strlen_zero(cnf->pinadmin) && - !strcasecmp(pin, cnf->pinadmin))) { + if ((!strcasecmp(pin, cnf->pin) && + (ast_strlen_zero(cnf->pinadmin) || + !ast_test_flag64(&confflags, CONFFLAG_ADMIN))) || + (!ast_strlen_zero(cnf->pinadmin) && + !strcasecmp(pin, cnf->pinadmin))) { /* Pin correct */ allowretry = 0; if (!ast_strlen_zero(cnf->pinadmin) && !strcasecmp(pin, cnf->pinadmin)) { |