From: Art Cancro Date: Thu, 23 Aug 2007 19:31:42 +0000 (+0000) Subject: When outputting the extension data for a X-Git-Tag: v7.86~3120 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=7c7698836856107cf05908ddb4314a82506ddd76;p=citadel.git When outputting the extension data for a MIME part in BODYSTRUCTURE, the parameter 'NAME' now appears as the first item in the list. Previously we output 'CHARSET' first. Either one is perfectly legal IMAP, but the Asterisk voicemail application stupidly assumes that 'NAME' will come first, and barfs if it doesn't. So we cater to its naivete. --- diff --git a/citadel/modules/imap/imap_fetch.c b/citadel/modules/imap/imap_fetch.c index 3af4e8cb7..216568812 100644 --- a/citadel/modules/imap/imap_fetch.c +++ b/citadel/modules/imap/imap_fetch.c @@ -793,6 +793,10 @@ void imap_fetch_bodystructure_part( cprintf("("); /* begin body parameter list */ + /* "NAME" must appear as the first parameter. This is not required by IMAP, + * but the Asterisk voicemail application blindly assumes that NAME will be in + * the first position. If it isn't, it rejects the message. + */ if (name != NULL) if (!IsEmptyStr(name)) { cprintf("\"NAME\" "); imap_strout(name);