[Asterisk-cvs] asterisk/apps app_voicemail.c,1.42,1.43

markster at lists.digium.com markster at lists.digium.com
Thu Dec 4 16:53:01 CST 2003


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

Modified Files:
	app_voicemail.c 
Log Message:
Fix PGSQL voicemail issues (bug #625) and fix reload races in iax2


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- app_voicemail.c	24 Nov 2003 22:14:54 -0000	1.42
+++ app_voicemail.c	4 Dec 2003 23:19:26 -0000	1.43
@@ -266,11 +266,15 @@
 		if (context) {
 			strcpy(retval->context, context);
 		}
+		else
+		{
+			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 mailbox='%s'", mailbox);
+			sprintf(query, "SELECT password,fullname,email,pager,options FROM voicemail WHERE context='default' AND mailbox='%s'", mailbox);
 		}
 /*	fprintf(stderr,"postgres find_user: query = %s\n",query); */
 		ast_mutex_lock(&postgreslock);




More information about the svn-commits mailing list