summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-01-23 04:35:04 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-01-23 04:35:04 +0000
commit6df535971beec926888633b13502b3d46d415f32 (patch)
tree858c8e4338de69f4e132b76368aef44eae4e1189 /apps/app_voicemail.c
parent65e31e074188431c4844c297aaafb2af80d11df2 (diff)
Merged revisions 99777 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r99777 | tilghman | 2008-01-22 22:31:51 -0600 (Tue, 22 Jan 2008) | 8 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@99778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 0ba4e36be..c252a72fb 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1010,8 +1010,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)