Projects
Kolab:3.4
cyrus-imapd
cyrus-imapd-2.5-with-dav-ifdefs.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cyrus-imapd-2.5-with-dav-ifdefs.patch of Package cyrus-imapd (Revision 39)
Currently displaying revision
39
,
Show latest
diff --git a/Makefile.am b/Makefile.am index 8b227ea..204dfab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1184,7 +1184,6 @@ dist_man_MANS = \ man/deliver.8 \ man/fetchnews.8 \ man/fud.8 \ - man/httpd.8 \ man/idled.8 \ man/imapd.8 \ man/ipurge.8 \ @@ -1200,17 +1199,27 @@ dist_man_MANS = \ man/rmnews.8 \ man/smmapd.8 \ man/syncnews.8 \ - man/sync_client.8 \ - man/sync_reset.8 \ - man/sync_server.8 \ man/timsieved.8 \ man/tls_prune.8 \ man/unexpunge.8 -if USE_SQUAT + +if SQUATTER dist_man_MANS += \ man/squatter.8 endif +if HTTPD +dist_man_MANS += \ + man/httpd.8 +endif + +if REPLICATION +dist_man_MANS += \ + man/sync_client.8 \ + man/sync_reset.8 \ + man/sync_server.8 +endif + master_master_SOURCES = \ master/cyrusMasterMIB.c \ master/cyrusMasterMIB.h \ diff --git a/imap/mailbox.c b/imap/mailbox.c index f9ae70a..3baf44e 100644 --- a/imap/mailbox.c +++ b/imap/mailbox.c @@ -51,7 +51,9 @@ #elif defined(HAVE_STDINT_H) # include <stdint.h> #endif +#ifdef WITH_DAV #include <libical/vcc.h> +#endif #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -81,8 +83,10 @@ #include "annotate.h" #include "assert.h" +#ifdef WITH_DAV #include "caldav_db.h" #include "carddav_db.h" +#endif #include "crc32.h" #include "md5.h" #include "exitcodes.h" @@ -2666,6 +2670,7 @@ out: return r; } +#ifdef WITH_DAV static int mailbox_update_carddav(struct mailbox *mailbox, struct index_record *old, struct index_record *new) @@ -2886,6 +2891,7 @@ static int mailbox_update_dav(struct mailbox *mailbox, return mailbox_update_caldav(mailbox, old, new); return 0; } +#endif //WITH_DAV EXPORTED int mailbox_update_conversations(struct mailbox *mailbox, struct index_record *old, @@ -3112,8 +3118,10 @@ static int mailbox_update_indexes(struct mailbox *mailbox, { int r = 0; +#ifdef WITH_DAV r = mailbox_update_dav(mailbox, old, new); if (r) return r; +#endif r = mailbox_update_conversations(mailbox, old, new); @@ -4238,6 +4246,7 @@ static int chkchildren(char *name, return r; } +#ifdef WITH_DAV EXPORTED int mailbox_add_dav(struct mailbox *mailbox) { struct index_record record; @@ -4257,6 +4266,7 @@ EXPORTED int mailbox_add_dav(struct mailbox *mailbox) return 0; } +#endif EXPORTED int mailbox_add_conversations(struct mailbox *mailbox) { diff --git a/imap/mailbox.h b/imap/mailbox.h index 5d3ed01..fe0bf91 100644 --- a/imap/mailbox.h +++ b/imap/mailbox.h @@ -587,6 +587,8 @@ extern int mailbox_get_xconvmodseq(struct mailbox *mailbox, modseq_t *); extern int mailbox_update_xconvmodseq(struct mailbox *mailbox, modseq_t, int force); extern int mailbox_has_conversations(struct mailbox *mailbox); +#ifdef WITH_DAV extern int mailbox_add_dav(struct mailbox *mailbox); +#endif #endif /* INCLUDED_MAILBOX_H */ diff --git a/imap/mboxevent.c b/imap/mboxevent.c index eabc462..13f0945 100644 --- a/imap/mboxevent.c +++ b/imap/mboxevent.c @@ -53,8 +53,10 @@ #include "annotate.h" #include "assert.h" +#ifdef WITH_DAV #include "caldav_db.h" #include "carddav_db.h" +#endif #include "exitcodes.h" #include "imapurl.h" #include "libconfig.h" @@ -131,9 +133,11 @@ static struct mboxevent event_template = { EVENT_USER, "user", EVENT_PARAM_STRING, 0, 0 }, { EVENT_MESSAGE_SIZE, "messageSize", EVENT_PARAM_INT, 0, 0 }, { EVENT_MESSAGE_CID, "vnd.fastmail.cid", EVENT_PARAM_STRING, 0, 0 }, +#ifdef WITH_DAV { EVENT_MBTYPE, "vnd.cmu.mbtype", EVENT_PARAM_STRING, 0, 0 }, { EVENT_DAV_FILENAME, "vnd.cmu.davFilename", EVENT_PARAM_STRING, 0, 0 }, { EVENT_DAV_UID, "vnd.cmu.davUid", EVENT_PARAM_STRING, 0, 0 }, +#endif /* always at end to let the parser to easily truncate this part */ { EVENT_ENVELOPE, "vnd.cmu.envelope", EVENT_PARAM_STRING, 0, 0 }, { EVENT_BODYSTRUCTURE, "bodyStructure", EVENT_PARAM_STRING, 0, 0 }, @@ -374,8 +378,10 @@ static int mboxevent_expected_param(enum event_type type, enum event_param param return extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_VND_FASTMAIL_SESSIONID; case EVENT_MAILBOX_ID: return (type & MAILBOX_EVENTS); +#ifdef WITH_DAV case EVENT_MBTYPE: return (type & MAILBOX_EVENTS); +#endif case EVENT_MAX_MESSAGES: return type & QUOTA_EVENTS; case EVENT_MESSAGE_CONTENT: @@ -387,12 +393,14 @@ static int mboxevent_expected_param(enum event_type type, enum event_param param case EVENT_MESSAGE_CID: return (extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_VND_FASTMAIL_CID) && (type & (EVENT_MESSAGE_APPEND|EVENT_MESSAGE_NEW)); +#ifdef WITH_DAV case EVENT_DAV_FILENAME: return (extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_VND_CMU_DAVFILENAME) && (type & EVENT_CALENDAR); case EVENT_DAV_UID: return (extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_VND_CMU_DAVUID) && (type & EVENT_CALENDAR); +#endif case EVENT_MESSAGES: if (type & (EVENT_QUOTA_EXCEED|EVENT_QUOTA_WITHIN)) return 1; @@ -738,6 +746,7 @@ EXPORTED void mboxevent_extract_record(struct mboxevent *event, struct mailbox * cacheitem_size(record, CACHE_BODYSTRUCTURE))); } +#ifdef WITH_DAV /* add caldav items */ if ((mailbox->mbtype & (MBTYPES_DAV)) && (mboxevent_expected_param(event->type, EVENT_DAV_FILENAME) || @@ -779,7 +788,7 @@ EXPORTED void mboxevent_extract_record(struct mboxevent *event, struct mailbox * } } } - +#endif //WITH_DAV } void mboxevent_extract_copied_record(struct mboxevent *event, @@ -991,8 +1000,10 @@ EXPORTED void mboxevent_extract_mailbox(struct mboxevent *event, imapurl_toURL(url, &imapurl); FILL_STRING_PARAM(event, EVENT_URI, xstrdup(url)); +#ifdef WITH_DAV FILL_STRING_PARAM(event, EVENT_MBTYPE, xstrdup(mboxlist_mbtype_to_string(mailbox->mbtype))); +#endif /* mailbox related events also require mailboxID */ if (event->type & MAILBOX_EVENTS) { diff --git a/imap/mboxevent.h b/imap/mboxevent.h index f56ad9e..2f1e022 100644 --- a/imap/mboxevent.h +++ b/imap/mboxevent.h @@ -113,9 +113,11 @@ enum event_param { EVENT_USER, EVENT_MESSAGE_SIZE, EVENT_MESSAGE_CID, +#ifdef WITH_DAV EVENT_MBTYPE, EVENT_DAV_FILENAME, EVENT_DAV_UID, +#endif EVENT_ENVELOPE, EVENT_BODYSTRUCTURE, EVENT_CLIENT_ID, diff --git a/imap/sync_server.c b/imap/sync_server.c index 745b3cf..e51983d 100644 --- a/imap/sync_server.c +++ b/imap/sync_server.c @@ -74,9 +74,11 @@ #include "annotate.h" #include "append.h" #include "auth.h" +#ifdef WITH_DAV #include "caldav_db.h" #include "carddav_db.h" #include "dav_db.h" +#endif #include "dlist.h" #include "exitcodes.h" #include "global.h" @@ -291,9 +293,11 @@ int service_init(int argc __attribute__((unused)), statuscache_open(); } +#ifdef WITH_DAV dav_init(); caldav_init(); carddav_init(); +#endif return 0; } @@ -455,9 +459,11 @@ void shut_down(int code) proc_cleanup(); +#ifdef WITH_DAV carddav_done(); caldav_done(); dav_done(); +#endif if (config_getswitch(IMAPOPT_STATUSCACHE)) { statuscache_close();
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.