aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-12 01:30:55 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-12 01:30:55 +0000
commitd7d26d14c9fc999c78f8d7cc4e6fcdeed5d765bd (patch)
treeba6734888a3653d1cb6241d4d6c544eda29fc744 /apps
parentede4987bc294accd7f33bc4b6139fe98e2d80035 (diff)
update the password in memory as well when using externpass (bug #4602)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6092 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_voicemail.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 6b7573fb7..daa7d8619 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -662,7 +662,8 @@ 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);
- ast_safe_system(buf);
+ if (!ast_safe_system(buf))
+ ast_copy_string(vmu->password, newpassword, sizeof(vmu->password));
}
static int make_dir(char *dest, int len, char *context, char *ext, char *mailbox)
@@ -5446,7 +5447,7 @@ static int load_config(void)
zonesl = NULL;
users = NULL;
usersl = NULL;
- memset(ext_pass_cmd, 0, sizeof(ext_pass_cmd) - 1);
+ memset(ext_pass_cmd, 0, sizeof(ext_pass_cmd));
if (cfg) {
/* General settings */