diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-23 04:31:51 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-23 04:31:51 +0000 |
commit | 58db5e82a6c2f932ef03dd8634ce76a8d33e77aa (patch) | |
tree | 18aa793259bc67e0bbd7f4c96e83f27a1403ab73 /apps/app_voicemail.c | |
parent | 7db8fee45becd3d45f6e55eab89586e5355bb160 (diff) |
When we reset the password via an external command, we should also reset the
password stored in the in-memory list, too (otherwise it doesn't really take
effect).
(closes issue #11809)
Reported by: davetroy
Patches:
fix_externpass.diff uploaded by davetroy (license 384)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99777 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 971f913d3..8125c1646 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -856,8 +856,11 @@ static void vm_change_password_shell(struct ast_vm_user *vmu, char *newpassword) { char buf[255]; snprintf(buf,255,"%s %s %s %s",ext_pass_cmd,vmu->context,vmu->mailbox,newpassword); - if (!ast_safe_system(buf)) + if (!ast_safe_system(buf)) { ast_copy_string(vmu->password, newpassword, sizeof(vmu->password)); + /* Reset the password in memory, too */ + reset_user_pw(vmu->context, vmu->mailbox, newpassword); + } } static int make_dir(char *dest, int len, const char *context, const char *ext, const char *folder) |