]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
update the password in memory as well when using externpass (bug #4602)
authorRussell Bryant <russell@russellbryant.com>
Tue, 12 Jul 2005 01:34:16 +0000 (01:34 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 12 Jul 2005 01:34:16 +0000 (01:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6094 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
apps/app_voicemail.c

diff --git a/CHANGES b/CHANGES
index 1f98a1082d8ba3e40f7a568d6cc07ec91bdb4e3e..b215736fe49447af3abe001e3e47a3ccbf415c2e 100755 (executable)
--- a/CHANGES
+++ b/CHANGES
  -- app_meetme
     -- If the first caller into a conference hangs up while being prompted for
        the conference pin number, the conference will no longer be held open.
+ -- app_voicemail
+    -- When using the externpass option for voicemail, the password will be
+       immediately updated in memory as well, instead of having to wait for
+       the next time the configuration is reloaded. 
  -- app_zapras
     -- We now ensure buffer policy is restored after RAS is done with a channel.
        This could cause audio problems on the channel after zapras is done
index afe34b41c597bac47e1c7ae9e701ab8fc051e536..edd6843d9090f271e0078cf7889dd806bc5ac1f8 100755 (executable)
@@ -696,7 +696,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))
+               strncpy(vmu->password, newpassword, sizeof(vmu->password) - 1);
 }
 
 static int make_dir(char *dest, int len, char *context, char *ext, char *mailbox)
@@ -3995,7 +3996,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 */