[asterisk-commits] mmichelson: branch mmichelson/trunk-digiumphones r367375 - /team/mmichelson/t...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 23 08:40:28 CDT 2012
Author: mmichelson
Date: Wed May 23 08:40:24 2012
New Revision: 367375
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=367375
Log:
Corrections required in order to get app_voicemail to compile with IMAP support.
Modified:
team/mmichelson/trunk-digiumphones/apps/app_voicemail.c
Modified: team/mmichelson/trunk-digiumphones/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/trunk-digiumphones/apps/app_voicemail.c?view=diff&rev=367375&r1=367374&r2=367375
==============================================================================
--- team/mmichelson/trunk-digiumphones/apps/app_voicemail.c (original)
+++ team/mmichelson/trunk-digiumphones/apps/app_voicemail.c Wed May 23 08:40:24 2012
@@ -845,7 +845,7 @@
#else
#ifdef IMAP_STORAGE
#define DISPOSE(a,b) (imap_remove_file(a,b))
-#define STORE(a,b,c,d,e,f,g,h,i,j,k) (imap_store_file(a,b,c,d,e,f,g,h,i,j))
+#define STORE(a,b,c,d,e,f,g,h,i,j,k) (imap_store_file(a,b,c,d,e,f,g,h,i,j,k))
#define RETRIEVE(a,b,c,d) imap_retrieve_file(a,b,c,d)
#define EXISTS(a,b,c,d) (ast_fileexists(c,NULL,d) > 0)
#define RENAME(a,b,c,d,e,f,g,h) (rename_file(g,h));
@@ -1038,7 +1038,7 @@
static int write_password_to_file(const char *secretfn, const char *password);
struct ast_str *vm_mailbox_snapshot_str(const char *mailbox, const char *context);
static const char *substitute_escapes(const char *value);
-static int message_range_and_existence_check(struct vm_state *vms, const char *msg_ids [], size_t num_msgs, int *msg_nums);
+static int message_range_and_existence_check(struct vm_state *vms, const char *msg_ids [], size_t num_msgs, int *msg_nums, struct ast_vm_user *vmu);
struct ao2_container *inprocess_container;
@@ -2422,8 +2422,8 @@
}
make_email_file(p, myserveremail, vmu, msgnum, vmu->context, vmu->mailbox, "INBOX",
- chan ? S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL) : NULL,
- chan ? S_COR(chan->caller.id.name.valid, chan->caller.id.name.str, NULL) : NULL,
+ S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL),
+ S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, NULL),
fn, introfn, fmt, duration, 1, chan, NULL, 1, flag, msg_id);
/* read mail file to memory */
len = ftell(p);
@@ -2620,7 +2620,7 @@
}
snprintf(messagestring, sizeof(messagestring), "%ld", sendvms->msgArray[msgnum]);
ast_mutex_lock(&sendvms->lock);
- if ((mail_copy(sendvms->mailstream, messagestring, (char *) mbox(vmu, dest_folder)) == T)) {
+ if ((mail_copy(sendvms->mailstream, messagestring, (char *) mbox(vmu, imbox)) == T)) {
ast_mutex_unlock(&sendvms->lock);
return 0;
}
@@ -7597,7 +7597,7 @@
char *msg_id = NULL;
#ifdef IMAP_STORAGE
struct ast_config *msg_cfg;
- struct ast_config_flags config_flags = { CONFIG_FLAG_NOCACHE };
+ struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
char filename[PATH_MAX];
snprintf(filename, sizeof(filename), "%s.txt", fn);
@@ -7874,7 +7874,7 @@
int copy_msg_result = 0;
#ifdef IMAP_STORAGE
char filename[PATH_MAX];
- struct ast_config_flags config_flags = { CONFIG_FLAG_NOCACHE };
+ struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
const char *msg_id = NULL;
struct ast_config *msg_cfg;
#endif
@@ -10427,7 +10427,7 @@
struct vm_state *vms,
const char *msg_id)
{
- if (message_range_and_existence_check(vms, &msg_id, 1, &vms->curmsg)) {
+ if (message_range_and_existence_check(vms, &msg_id, 1, &vms->curmsg, vmu)) {
return -1;
}
/* Found the msg, so play it back */
@@ -14915,7 +14915,7 @@
* \retval -1 Failure
* \retval 0 Success
*/
-static int message_range_and_existence_check(struct vm_state *vms, const char *msg_ids [], size_t num_msgs, int *msg_nums)
+static int message_range_and_existence_check(struct vm_state *vms, const char *msg_ids [], size_t num_msgs, int *msg_nums, struct ast_vm_user *vmu)
{
int i;
int res = 0;
@@ -15060,7 +15060,7 @@
goto vm_forward_cleanup;
}
- if ((res = message_range_and_existence_check(&from_vms, msg_ids, num_msgs, msg_nums) < 0)) {
+ if ((res = message_range_and_existence_check(&from_vms, msg_ids, num_msgs, msg_nums, vmu) < 0)) {
goto vm_forward_cleanup;
}
@@ -15189,7 +15189,7 @@
goto vm_move_cleanup;
}
- if ((res = message_range_and_existence_check(&vms, old_msg_ids, num_msgs, old_msg_nums)) < 0) {
+ if ((res = message_range_and_existence_check(&vms, old_msg_ids, num_msgs, old_msg_nums, vmu)) < 0) {
goto vm_move_cleanup;
}
@@ -15294,7 +15294,7 @@
goto vm_remove_cleanup;
}
- if ((res = message_range_and_existence_check(&vms, msgs, num_msgs, msg_nums)) < 0) {
+ if ((res = message_range_and_existence_check(&vms, msgs, num_msgs, msg_nums, vmu)) < 0) {
goto vm_remove_cleanup;
}
@@ -15388,7 +15388,7 @@
}
open = 1;
- if (message_range_and_existence_check(&vms, &msg_id, 1, &vms.curmsg)) {
+ if (message_range_and_existence_check(&vms, &msg_id, 1, &vms.curmsg, vmu)) {
res = -1;
goto play2_msg_cleanup;
}
More information about the asterisk-commits
mailing list