From 7d0ec733619b5919c5ee0bc4f72d221740f53f6e Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 2 Mar 2009 04:11:04 +0000 Subject: [PATCH] * Added some comments next to portions of the code which are obsoleted by the final form of RFC 5464 (IMAP METADATA extension). The dependency on LIST-EXTENDED has been removed, and the Bynari Connector never needed it in the first place. After the code freeze is over we will remove the portions of our unfinished LIST-EXTENDED implementation which were to provide metadata, *or* we may simply remove the unfinished LIST-EXTENDED implementation altogether. --- citadel/modules/imap/imap_list.c | 16 ++++++++-------- citadel/modules/imap/serv_imap.c | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/citadel/modules/imap/imap_list.c b/citadel/modules/imap/imap_list.c index 373196ece..2ced210ae 100644 --- a/citadel/modules/imap/imap_list.c +++ b/citadel/modules/imap/imap_list.c @@ -108,7 +108,7 @@ void imap_listroom(struct ctdlroom *qrbuf, void *data) char **patterns; int return_subscribed = 0; int return_children = 0; - int return_metadata = 0; + int return_metadata = 0; /* FIXME obsolete remove this */ int i = 0; int match = 0; @@ -120,7 +120,7 @@ void imap_listroom(struct ctdlroom *qrbuf, void *data) patterns = (char **) data_for_callback[3]; return_subscribed = (int) data_for_callback[4]; return_children = (int) data_for_callback[5]; - return_metadata = (int) data_for_callback[6]; + return_metadata = (int) data_for_callback[6]; /* FIXME obsolete remove this */ /* Only list rooms to which the user has access!! */ yes_output_this_room = 0; @@ -170,7 +170,7 @@ void imap_listroom(struct ctdlroom *qrbuf, void *data) imap_strout(buf); if (return_metadata) { - cprintf(" (METADATA ())"); /* FIXME */ + cprintf(" (METADATA ())"); /* FIXME obsolete remove this */ } cprintf("\r\n"); @@ -200,10 +200,10 @@ void imap_list(int num_parms, char *parms[]) int extended_list_in_use = 0; int return_subscribed = 0; int return_children = 0; - int return_metadata = 0; - int select_metadata_left = (-1); - int select_metadata_right = (-1); - int select_metadata_nest = 0; + int return_metadata = 0; /* FIXME obsolete remove this */ + int select_metadata_left = (-1); /* FIXME obsolete remove this */ + int select_metadata_right = (-1); /* FIXME obsolete remove this */ + int select_metadata_nest = 0; /* FIXME obsolete remove this */ if (num_parms < 4) { cprintf("%s BAD arguments invalid\r\n", parms[0]); @@ -389,7 +389,7 @@ void imap_list(int num_parms, char *parms[]) data_for_callback[3] = (char *) patterns; data_for_callback[4] = (char *) return_subscribed; data_for_callback[5] = (char *) return_children; - data_for_callback[6] = (char *) return_metadata; + data_for_callback[6] = (char *) return_metadata; /* FIXME obsolete remove this */ /* The non-extended LIST command is required to treat an empty * ("" string) mailbox name argument as a special request to return the diff --git a/citadel/modules/imap/serv_imap.c b/citadel/modules/imap/serv_imap.c index af02dd68c..9dd687500 100644 --- a/citadel/modules/imap/serv_imap.c +++ b/citadel/modules/imap/serv_imap.c @@ -447,11 +447,20 @@ void imap_output_capability_string(void) { /* We are building a partial implementation of METADATA for the sole purpose * of interoperating with the ical/vcard version of the Bynari Insight Connector. - * If you were expecting something else, comment out one or both of these - * extension advertisements. + * It is not a full RFC5464 implementation, but it should refuse non-Bynari + * metadata in a compatible and graceful way. */ cprintf(" METADATA"); - /* cprintf(" LIST-EXTENDED"); */ + + /* + * LIST-EXTENDED was originally going to be required by the METADATA extension. + * It was mercifully removed prior to the finalization of RFC5464. We started + * implementing this but stopped when we learned that it would not be needed. + * If you uncomment this declaration you are responsible for writing a lot of new + * code. + * + * cprintf(" LIST-EXTENDED") + */ } /* -- 2.30.2