dect
/
asterisk
Archived
13
0
Fork 0

properly handle the return of the rowcount from ast_update_realtime (bug #4452)

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6089 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2005-07-11 23:13:11 +00:00
parent 84b415519d
commit 0b44d1f8e3
1 changed files with 5 additions and 1 deletions

View File

@ -408,8 +408,12 @@ static int change_password_realtime(struct ast_vm_user *vmu, const char *passwor
int res;
if (!ast_strlen_zero(vmu->uniqueid)) {
res = ast_update_realtime("voicemail", "uniqueid", vmu->uniqueid, "password", password, NULL);
if (!res)
if (res > 0) {
ast_copy_string(vmu->password, password, sizeof(vmu->password));
res = 0;
} else if (!res) {
res = -1;
}
return res;
}
return -1;