mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 08:11:21 +00:00
properly handle the return of the rowcount from ast_update_realtime (bug #4452)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -408,8 +408,12 @@ static int change_password_realtime(struct ast_vm_user *vmu, const char *passwor
|
|||||||
int res;
|
int res;
|
||||||
if (!ast_strlen_zero(vmu->uniqueid)) {
|
if (!ast_strlen_zero(vmu->uniqueid)) {
|
||||||
res = ast_update_realtime("voicemail", "uniqueid", vmu->uniqueid, "password", password, NULL);
|
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));
|
ast_copy_string(vmu->password, password, sizeof(vmu->password));
|
||||||
|
res = 0;
|
||||||
|
} else if (!res) {
|
||||||
|
res = -1;
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user