From 7c7698836856107cf05908ddb4314a82506ddd76 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 23 Aug 2007 19:31:42 +0000 Subject: [PATCH] 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. --- citadel/modules/imap/imap_fetch.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.30.2