[Asterisk-cvs] asterisk/apps app_voicemail.c,1.94,1.95

markster at lists.digium.com markster at lists.digium.com
Sun May 23 00:54:15 CDT 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv22591/apps

Modified Files:
	app_voicemail.c 
Log Message:
Use find_user for existsmailbox


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- app_voicemail.c	23 May 2004 04:21:42 -0000	1.94
+++ app_voicemail.c	23 May 2004 05:07:43 -0000	1.95
@@ -3423,7 +3423,8 @@
 
 static int vm_box_exists(struct ast_channel *chan, void *data) {
 	struct localuser *u;
-	struct ast_vm_user *user;
+	struct ast_vm_user *vmu;
+	struct ast_vm_user svm;
 	char *context, *box;
 	int branch=0;
 
@@ -3445,18 +3446,9 @@
 			break;
 		box++;
 	}
-	ast_mutex_lock(&vmlock);
-	user = users;
-	while (user) {
-		if ((!strcmp(box,user->mailbox)) && (!strcmp(context,user->context))) {
-			branch = 1;
-			break;
-		}
-		user = user->next;
-	}
-	ast_mutex_unlock(&vmlock);
+	vmu = find_user(&svm, context, box);
 
-	if (branch) {
+	if (vmu) {
 		if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid)) {
 			chan->priority += 100;
 		} else




More information about the svn-commits mailing list