[asterisk-commits] mmichelson: branch mmichelson/imap_consistency r130950 - /team/mmichelson/ima...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 15 10:25:19 CDT 2008
Author: mmichelson
Date: Tue Jul 15 10:25:19 2008
New Revision: 130950
URL: http://svn.digium.com/view/asterisk?view=rev&rev=130950
Log:
Make a special case in imap_retrieve_file for greetings since
they are not stored on the IMAP server.
Add explicit quotes around callerid name
Modified:
team/mmichelson/imap_consistency/apps/app_voicemail.c
Modified: team/mmichelson/imap_consistency/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/imap_consistency/apps/app_voicemail.c?view=diff&rev=130950&r1=130949&r2=130950
==============================================================================
--- team/mmichelson/imap_consistency/apps/app_voicemail.c (original)
+++ team/mmichelson/imap_consistency/apps/app_voicemail.c Tue Jul 15 10:25:19 2008
@@ -1662,6 +1662,13 @@
struct vm_state *vms;
char text_file[PATH_MAX];
FILE *text_file_ptr;
+
+ /* Greetings are not stored on the IMAP server, so we should not
+ * attempt to retrieve them.
+ */
+ if (msgnum < 0) {
+ return 0;
+ }
/* Before anything can happen, we need a vm_state so that we can
* actually access the imap server
@@ -1728,7 +1735,7 @@
*/
cid_num = get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Num:");
cid_name = get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Name:");
- fprintf(text_file_ptr, "callerid=%s <%s>\n", S_OR(cid_name, ""), S_OR(cid_num, ""));
+ fprintf(text_file_ptr, "callerid=\"%s\" <%s>\n", S_OR(cid_name, ""), S_OR(cid_num, ""));
context = get_header_by_tag(header_content, "X-Asterisk-VM-Context:");
fprintf(text_file_ptr, "context=%s\n", S_OR(context, ""));
origtime = get_header_by_tag(header_content, "X-Asterisk-VM-Orig-time:");
More information about the asterisk-commits
mailing list