mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 07:18:15 +00:00
Fix PGSQL voicemail issues (bug #625) and fix reload races in iax2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -266,11 +266,15 @@ static struct ast_vm_user *find_user(struct ast_vm_user *ivm, char *context, cha
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user