[Asterisk-cvs] asterisk/apps app_voicemail.c,1.49,1.50

malcolmd at lists.digium.com malcolmd at lists.digium.com
Thu Jan 8 14:32:29 CST 2004


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

Modified Files:
	app_voicemail.c 
Log Message:
Fix Bug #625: Voicemail with PostgreSQL backend called with no context puts msgs in 
wrong place


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- app_voicemail.c	7 Jan 2004 23:41:21 -0000	1.49
+++ app_voicemail.c	8 Jan 2004 20:24:13 -0000	1.50
@@ -287,12 +287,8 @@
 		{
 			strcpy(retval->context, "default");
 		}
-
-		if (*retval->context) {
-			sprintf(query, "SELECT password,fullname,email,pager,options FROM voicemail WHERE context='%s' AND mailbox='%s'", context, mailbox);
-		} else {
-			sprintf(query, "SELECT password,fullname,email,pager,options FROM voicemail WHERE context='default' AND mailbox='%s'", mailbox);
-		}
+		sprintf(query, "SELECT password,fullname,email,pager,options FROM voicemail WHERE context='%s' AND mailbox='%s'", retval->context, mailbox);
+		
 /*	fprintf(stderr,"postgres find_user: query = %s\n",query); */
 		ast_mutex_lock(&postgreslock);
 		PGSQLres=PQexec(dbhandler,query);




More information about the svn-commits mailing list