From d8ea0b390e111014f00a43ed0acf3aeb53987901 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 6 Dec 2011 00:25:37 -0500 Subject: [PATCH] IMPORTANT FIX TO VCARD / GLOBAL ADDRESS BOOK ROOM. VERSION UPDATE TO 8.03. DEPLOY IMMEDIATELY. --- citadel/citadel.h | 2 +- citadel/configure.ac | 2 +- citadel/debian/changelog | 6 ++++++ citadel/modules/vcard/serv_vcard.c | 14 ++------------ citadel/msgbase.c | 13 ++++++------- citadel/techdoc/hack.txt | 2 ++ 6 files changed, 18 insertions(+), 21 deletions(-) diff --git a/citadel/citadel.h b/citadel/citadel.h index 03c71a7ea..dbef91b29 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -51,7 +51,7 @@ extern "C" { * usually more strict because you're not really supposed to dump/load and * upgrade at the same time. */ -#define REV_LEVEL 802 /* This version */ +#define REV_LEVEL 803 /* This version */ #define REV_MIN 591 /* Oldest compatible database */ #define EXPORT_REV_MIN 760 /* Oldest compatible export files */ #define LIBCITADEL_MIN 802 /* Minimum required version of libcitadel */ diff --git a/citadel/configure.ac b/citadel/configure.ac index 699ca7446..5a49e25ff 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) -AC_INIT([Citadel], [8.02], [http://www.citadel.org/]) +AC_INIT([Citadel], [8.03], [http://www.citadel.org/]) AC_REVISION([$Revision: 5108 $]) AC_CONFIG_SRCDIR([citserver.c]) AC_CONFIG_HEADER(sysdep.h) diff --git a/citadel/debian/changelog b/citadel/debian/changelog index bc73b94e0..783e87420 100644 --- a/citadel/debian/changelog +++ b/citadel/debian/changelog @@ -1,3 +1,9 @@ +citadel (8.03-1) stable; urgency=low + + * new upstream version + + -- Wilfried Goesgens Mon, 5 Dec 2011 22:00:00 +0001 + citadel (8.02-1) stable; urgency=low * new upstream version diff --git a/citadel/modules/vcard/serv_vcard.c b/citadel/modules/vcard/serv_vcard.c index 9c62b0347..141a362e8 100644 --- a/citadel/modules/vcard/serv_vcard.c +++ b/citadel/modules/vcard/serv_vcard.c @@ -318,7 +318,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) { && (!strcasecmp(&CC->room.QRname[11], USERCONFIGROOM)) ) { /* Yes, we want to do this */ yes_my_citadel_config = 1; - syslog(LOG_DEBUG, "GAB: user config room detected"); #ifdef VCARD_SAVES_BY_AIDES_ONLY /* Prevent non-aides from performing registration changes */ @@ -332,7 +331,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) { /* Is this a room with an address book in it? */ if (CC->room.QRdefaultview == VIEW_ADDRESSBOOK) { yes_any_vcard_room = 1; - syslog(LOG_DEBUG, "GAB: address book room detected"); } /* If neither condition exists, don't run this hook. */ @@ -364,7 +362,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) { } s = vcard_get_prop(v, "fn", 1, 0, 0); - if (s) syslog(LOG_DEBUG, "GAB: vCard beforesave hook running for <%s>\n", s); if (yes_my_citadel_config) { /* Bingo! The user is uploading a new vCard, so @@ -395,7 +392,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) { * vCard in the user's config room at all times. * */ - syslog(LOG_DEBUG, "GAB: deleting old vCard for user"); CtdlDeleteMessages(CC->room.QRname, NULL, 0, "[Tt][Ee][Xx][Tt]/.*[Vv][Cc][Aa][Rr][Dd]$"); /* Make the author of the message the name of the user. */ @@ -471,7 +467,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) { /* Now allow the save to complete. */ vcard_free(v); - syslog(LOG_DEBUG, "GAB: save will proceed"); return(0); } @@ -500,17 +495,14 @@ int vcard_upload_aftersave(struct CtdlMessage *msg) { if ( (strlen(CC->room.QRname) >= 12) && (!strcasecmp(&CC->room.QRname[11], USERCONFIGROOM)) ) { is_UserConf = 1; /* It's someone's config room */ - syslog(LOG_DEBUG, "GAB: this is someone's config room"); } CtdlMailboxName(roomname, sizeof roomname, &CC->user, USERCONFIGROOM); if (!strcasecmp(CC->room.QRname, roomname)) { is_UserConf = 1; is_MY_UserConf = 1; /* It's MY config room */ - syslog(LOG_DEBUG, "GAB: this is MY config room"); } if (!strcasecmp(CC->room.QRname, ADDRESS_BOOK_ROOM)) { is_GAB = 1; /* It's the Global Address Book */ - syslog(LOG_DEBUG, "GAB: this is the Global Address Book"); } if (!is_UserConf && !is_GAB) return(0); @@ -529,9 +521,8 @@ int vcard_upload_aftersave(struct CtdlMessage *msg) { * copy it to the Global Address Book room. */ - I = atol(msg->cm_fields['I']); - syslog(LOG_DEBUG, "GAB: \033[35m%s\033[0m", msg->cm_fields['I']); - if (I < 0L) return(0); + I = atol(msg->cm_fields['3']); + if (I <= 0L) return(0); /* Store our Internet return address in memory */ if (is_MY_UserConf) { @@ -546,7 +537,6 @@ int vcard_upload_aftersave(struct CtdlMessage *msg) { if (!is_GAB) { // This is not the GAB /* Put it in the Global Address Book room... */ - syslog(LOG_DEBUG, "GAB: copying to Global Address Book"); CtdlSaveMsgPointerInRoom(ADDRESS_BOOK_ROOM, I, 1, msg); } diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 3919cf911..68c94cca0 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -2595,7 +2595,6 @@ int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms "CtdlSaveMsgPointersInRoom(room=%s, num_msgs=%d, repl=%d, suppress_rca=%d)\n", roomname, num_newmsgs, do_repl_check, suppress_refcount_adj ); - if (num_newmsgs > 0) for (i=0; iroom.QRname); @@ -2642,10 +2641,6 @@ int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms } if (unique) { msgs_to_be_merged[num_msgs_to_be_merged++] = newmsgidlist[i]; - syslog(LOG_DEBUG, "\033[32mmsg %ld is being merged\033[0m", newmsgidlist[i]); - } - else { - syslog(LOG_DEBUG, "\033[31mmsg %ld is not unique\033[0m", newmsgidlist[i]); } } @@ -3222,14 +3217,18 @@ long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */ } else { syslog(LOG_DEBUG, "No user <%s>\n", recipient); - CtdlSaveMsgPointerInRoom(config.c_aideroom, - newmsgid, 0, msg); + CtdlSaveMsgPointerInRoom(config.c_aideroom, newmsgid, 0, msg); } } /* Perform "after save" hooks */ syslog(LOG_DEBUG, "Performing after-save hooks\n"); + if (msg->cm_fields['3'] != NULL) free(msg->cm_fields['3']); + msg->cm_fields['3'] = malloc(20); + snprintf(msg->cm_fields['3'], 20, "%ld", newmsgid); PerformMessageHooks(msg, EVT_AFTERSAVE); + free(msg->cm_fields['3']); + msg->cm_fields['3'] = NULL; /* For IGnet mail, we have to save a new copy into the spooler for * each recipient, with the R and D fields set to the recipient and diff --git a/citadel/techdoc/hack.txt b/citadel/techdoc/hack.txt index 38d09f4f6..f75f596f8 100644 --- a/citadel/techdoc/hack.txt +++ b/citadel/techdoc/hack.txt @@ -291,6 +291,8 @@ Y carbon copY Optional, and only in Mail messages. 1 suppress index The presence of this field indicates that the message is disqualified from being added to the full text index. 2 extnotify Used internally by the serv_extnotify module. +3 msgnum Used internally to pass the local message number in the + database to after-save hooks. Discarded afterwards. EXAMPLE -- 2.30.2