PostgreSQL Voicemail NULL password..Bug #546
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
b4141f7e91
commit
ee480fecae
|
@ -269,7 +269,7 @@ static struct ast_vm_user *find_user(struct ast_vm_user *ivm, char *context, cha
|
|||
if (retval) {
|
||||
*retval->mailbox='\0';
|
||||
*retval->context='\0';
|
||||
*retval->password='\0';
|
||||
strcpy(retval->password, "NULL");
|
||||
*retval->fullname='\0';
|
||||
*retval->email='\0';
|
||||
*retval->pager='\0';
|
||||
|
@ -319,7 +319,7 @@ static struct ast_vm_user *find_user(struct ast_vm_user *ivm, char *context, cha
|
|||
}
|
||||
for (i=0; i<numFields; i++) {
|
||||
fname = PQfname(PGSQLres,i);
|
||||
if (!strcmp(fname, "password")) {
|
||||
if (!strcmp(fname, "password") && !PQgetisnull (PGSQLres,0,i)) {
|
||||
strncpy(retval->password, PQgetvalue(PGSQLres,0,i),sizeof(retval->password) - 1);
|
||||
} else if (!strcmp(fname, "fullname")) {
|
||||
strncpy(retval->fullname, PQgetvalue(PGSQLres,0,i),sizeof(retval->fullname) - 1);
|
||||
|
|
Loading…
Reference in New Issue