summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBrett Bryant <bbryant@digium.com>2010-09-07 17:57:32 +0000
committerBrett Bryant <bbryant@digium.com>2010-09-07 17:57:32 +0000
commitf5418e227958a2601809ec594cac00abeb5676ce (patch)
treef89aeed83ad546ee4a49a6ce0e96eee25bbffc09 /apps
parent6c5e3d59669081b322d73444403cd5ec7f6f4e82 (diff)
Merged revisions 285197 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r285197 | bbryant | 2010-09-07 13:54:21 -0400 (Tue, 07 Sep 2010) | 24 lines Merged revisions 285196 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r285196 | bbryant | 2010-09-07 13:49:07 -0400 (Tue, 07 Sep 2010) | 17 lines Merged revisions 285194 via svnmerge from 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/trunk@285199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 5b050e99d..8f0a5bd82 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1493,11 +1493,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;