From: Jeremy McNamara Date: Tue, 13 Jan 2004 04:42:39 +0000 (+0000) Subject: Don't return -1 for successful conf in meetme. Bug #824 X-Git-Tag: 0.7.0~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1488a63ef92ae1e8ee17349f336be1c3e855632;p=thirdparty%2Fasterisk.git Don't return -1 for successful conf in meetme. Bug #824 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2005 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 580ebb5c37..9c4507b9b9 100755 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -707,21 +707,25 @@ static int conf_exec(struct ast_channel *chan, void *data) /* Prompt user for pin if pin is required */ res = ast_app_getdata(chan, "conf-getpin", pin, sizeof(pin) - 1, 0); } - if (res == 0) { + if (res >= 0) { if (!strcasecmp(pin, cnf->pin)) { /* Pin correct */ allowretry = 0; /* Run the conference */ res = conf_run(chan, cnf, confflags); + } else { + /* Pin invalid */ + res = ast_streamfile(chan, "conf-invalidpin", chan->language); + if (!res) + ast_waitstream(chan, ""); + res = -1; + if (allowretry) + strcpy(confno, ""); } + } else { + res = -1; + allowretry = 0; } - /* Pin invalid or error */ - res = ast_streamfile(chan, "conf-invalidpin", chan->language); - if (!res) - ast_waitstream(chan, ""); - res = -1; - if (allowretry) - strcpy(confno, ""); } else { /* No pin required */ allowretry = 0;