Use find_user for existsmailbox

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Mark Spencer 22 years ago
parent 9f14461cb7
commit 740243552f

@ -3423,7 +3423,8 @@ static int append_mailbox(char *context, char *mbox, char *data)
static int vm_box_exists(struct ast_channel *chan, void *data) { static int vm_box_exists(struct ast_channel *chan, void *data) {
struct localuser *u; struct localuser *u;
struct ast_vm_user *user; struct ast_vm_user *vmu;
struct ast_vm_user svm;
char *context, *box; char *context, *box;
int branch=0; int branch=0;
@ -3445,18 +3446,9 @@ static int vm_box_exists(struct ast_channel *chan, void *data) {
break; break;
box++; box++;
} }
ast_mutex_lock(&vmlock); vmu = find_user(&svm, context, box);
user = users;
while (user) {
if ((!strcmp(box,user->mailbox)) && (!strcmp(context,user->context))) {
branch = 1;
break;
}
user = user->next;
}
ast_mutex_unlock(&vmlock);
if (branch) { if (vmu) {
if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid)) { if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid)) {
chan->priority += 100; chan->priority += 100;
} else } else

Loading…
Cancel
Save