automerge commit

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@14867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Automerge script
2006-03-25 05:07:29 +00:00
parent 0345a25e6a
commit 98ba3160e7

View File

@@ -3483,11 +3483,13 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
vmtmp = extensions;
if (flag==1) {
struct leave_vm_options leave_options;
char mailbox[AST_MAX_EXTENSION * 2 + 2];
snprintf(mailbox, sizeof(mailbox), "%s@%s", username, context);
/* Send VoiceMail */
memset(&leave_options, 0, sizeof(leave_options));
leave_options.record_gain = record_gain;
cmd = leave_voicemail(chan, username, &leave_options);
cmd = leave_voicemail(chan, mailbox, &leave_options);
} else {
/* Forward VoiceMail */
RETRIEVE(dir, curmsg);
@@ -3890,7 +3892,7 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu)
return ERROR_LOCK_PATH;
vms->curmsg = -1;
for (x=0;x < vmu->maxmsg;x++) {
for (x = 0; x < vmu->maxmsg; x++) {
if (!vms->deleted[x] && (strcasecmp(vms->curbox, "INBOX") || !vms->heard[x])) {
/* Save this message. It's not in INBOX or hasn't been heard */
make_file(vms->fn, sizeof(vms->fn), vms->curdir, x);
@@ -3924,9 +3926,9 @@ static int close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu)
done:
if (vms->deleted)
memset(vms->deleted, 0, sizeof(vms->deleted));
memset(vms->deleted, 0, vmu->maxmsg * sizeof(int));
if (vms->heard)
memset(vms->heard, 0, sizeof(vms->heard));
memset(vms->heard, 0, vmu->maxmsg * sizeof(int));
return 0;
}
@@ -6522,13 +6524,15 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
} else {
if (find_user(NULL, vmu->context, num)) {
struct leave_vm_options leave_options;
char mailbox[AST_MAX_EXTENSION * 2 + 2];
snprintf(mailbox, sizeof(mailbox), "%s@%s", num, vmu->context);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Leaving voicemail for '%s' in context '%s'\n", num, vmu->context);
memset(&leave_options, 0, sizeof(leave_options));
leave_options.record_gain = record_gain;
res = leave_voicemail(chan, num, &leave_options);
res = leave_voicemail(chan, mailbox, &leave_options);
if (!res)
res = 't';
return res;