]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 285194 via svnmerge from
authorBrett Bryant <bbryant@digium.com>
Tue, 7 Sep 2010 17:49:07 +0000 (17:49 +0000)
committerBrett Bryant <bbryant@digium.com>
Tue, 7 Sep 2010 17:49:07 +0000 (17:49 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r285194 | bbryant | 2010-09-07 13:45:41 -0400 (Tue, 07 Sep 2010) | 10 lines

  Fixes voicemail.conf issues where mailboxes with passwords that don't precede a comma would throw unnecessary error messages.

  (closes issue #15726)
  Reported by: 298
  Patches:
        M15726.diff uploaded by junky (license 177)
  Tested by: junky

  Review: [full review board URL with trailing slash]
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@285196 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 122f92a87819a0e0df1e239f0b91fc53e9d499eb..a3cd60fd354ce1a9d8af55bd9f3141ab5a13fcf3 100644 (file)
@@ -1380,11 +1380,12 @@ static void vm_change_password(struct ast_vm_user *vmu, const char *newpassword)
                                }
                                value = strstr(tmp,",");
                                if (!value) {
-                                       ast_log(AST_LOG_WARNING, "variable has bad format.\n");
-                                       break;
+                                       new = alloca(strlen(newpassword)+1);
+                                       sprintf(new, "%s", newpassword);
+                               } else {
+                                       new = alloca((strlen(value)+strlen(newpassword)+1));
+                                       sprintf(new,"%s%s", newpassword, value);
                                }
-                               new = alloca((strlen(value)+strlen(newpassword)+1));
-                               sprintf(new,"%s%s", newpassword, value);
                                if (!(cat = ast_category_get(cfg, category))) {
                                        ast_log(AST_LOG_WARNING, "Failed to get category structure.\n");
                                        break;