projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
56f6d0c
)
refactor naming of core message manipulation funcions
author
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 1 Sep 2013 12:58:06 +0000
(14:58 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 1 Sep 2013 12:58:06 +0000
(14:58 +0200)
29 files changed:
citadel/euidindex.c
patch
|
blob
|
history
citadel/internet_addressing.c
patch
|
blob
|
history
citadel/journaling.c
patch
|
blob
|
history
citadel/modules/autocompletion/serv_autocompletion.c
patch
|
blob
|
history
citadel/modules/calendar/serv_calendar.c
patch
|
blob
|
history
citadel/modules/expire/serv_expire.c
patch
|
blob
|
history
citadel/modules/extnotify/extnotify_main.c
patch
|
blob
|
history
citadel/modules/fulltext/serv_fulltext.c
patch
|
blob
|
history
citadel/modules/imap/imap_fetch.c
patch
|
blob
|
history
citadel/modules/imap/imap_misc.c
patch
|
blob
|
history
citadel/modules/imap/imap_search.c
patch
|
blob
|
history
citadel/modules/inetcfg/serv_inetcfg.c
patch
|
blob
|
history
citadel/modules/instmsg/serv_instmsg.c
patch
|
blob
|
history
citadel/modules/migrate/serv_migrate.c
patch
|
blob
|
history
citadel/modules/network/serv_netmail.c
patch
|
blob
|
history
citadel/modules/network/serv_netspool.c
patch
|
blob
|
history
citadel/modules/network/serv_network.c
patch
|
blob
|
history
citadel/modules/pop3client/serv_pop3client.c
patch
|
blob
|
history
citadel/modules/rssclient/rss_atom_parser.c
patch
|
blob
|
history
citadel/modules/sieve/serv_sieve.c
patch
|
blob
|
history
citadel/modules/smtp/serv_smtp.c
patch
|
blob
|
history
citadel/modules/smtp/serv_smtpeventclient.c
patch
|
blob
|
history
citadel/modules/smtp/serv_smtpqueue.c
patch
|
blob
|
history
citadel/modules/smtp/smtp_util.c
patch
|
blob
|
history
citadel/modules/vcard/serv_vcard.c
patch
|
blob
|
history
citadel/modules/wiki/serv_wiki.c
patch
|
blob
|
history
citadel/modules/xmpp/xmpp_presence.c
patch
|
blob
|
history
citadel/msgbase.c
patch
|
blob
|
history
citadel/msgbase.h
patch
|
blob
|
history
diff --git
a/citadel/euidindex.c
b/citadel/euidindex.c
index 8a40cce13662a8b8100a0ffe760e454d6b2939de..f103de2d4529a830456a2c3ae8e47e6cb7fcc8ef 100644
(file)
--- a/
citadel/euidindex.c
+++ b/
citadel/euidindex.c
@@
-165,7
+165,7
@@
void rebuild_euid_index_for_msg(long msgnum, void *userdata) {
if (!CM_IsEmpty(msg, eExclusiveID)) {
index_message_by_euid(msg->cm_fields[eExclusiveID], &CC->room, msgnum);
}
if (!CM_IsEmpty(msg, eExclusiveID)) {
index_message_by_euid(msg->cm_fields[eExclusiveID], &CC->room, msgnum);
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
diff --git
a/citadel/internet_addressing.c
b/citadel/internet_addressing.c
index 32e70af1a1a73f034025c0e03152b0fa1ff12038..8d751d844d71361a2d385044501d03dea5108c20 100644
(file)
--- a/
citadel/internet_addressing.c
+++ b/
citadel/internet_addressing.c
@@
-731,7
+731,7
@@
void convert_references_to_wefewences(char *str) {
/*
* Convert an RFC822 message (headers + body) to a CtdlMessage structure.
* NOTE: the supplied buffer becomes part of the CtdlMessage structure, and
/*
* Convert an RFC822 message (headers + body) to a CtdlMessage structure.
* NOTE: the supplied buffer becomes part of the CtdlMessage structure, and
- * will be deallocated when C
tdlFreeMessag
e() is called. Therefore, the
+ * will be deallocated when C
M_Fre
e() is called. Therefore, the
* supplied buffer should be DEREFERENCED. It should not be freed or used
* again.
*/
* supplied buffer should be DEREFERENCED. It should not be freed or used
* again.
*/
diff --git
a/citadel/journaling.c
b/citadel/journaling.c
index 9ea593bd827f9615e620a51b807d786b8704e8b3..27cf0580c307d881f6c37d132cd65ae4309cacc4 100644
(file)
--- a/
citadel/journaling.c
+++ b/
citadel/journaling.c
@@
-287,7
+287,7
@@
void JournalRunQueueMsg(struct jnlq *jmsg) {
/* Submit journal message */
CtdlSubmitMsg(journal_msg, journal_recps, "", 0);
/* Submit journal message */
CtdlSubmitMsg(journal_msg, journal_recps, "", 0);
- C
tdlFreeMessag
e(journal_msg);
+ C
M_Fre
e(journal_msg);
}
free_recipients(journal_recps);
}
free_recipients(journal_recps);
diff --git
a/citadel/modules/autocompletion/serv_autocompletion.c
b/citadel/modules/autocompletion/serv_autocompletion.c
index 8bb5da0217400eec9b10ac8802b9f72c4017d816..00e190839bda557cdfeb6baafb410bf0f52e4245 100644
(file)
--- a/
citadel/modules/autocompletion/serv_autocompletion.c
+++ b/
citadel/modules/autocompletion/serv_autocompletion.c
@@
-63,7
+63,7
@@
void hunt_for_autocomplete(long msgnum, char *search_string) {
if (msg == NULL) return;
v = vcard_load(msg->cm_fields[eMesageText]);
if (msg == NULL) return;
v = vcard_load(msg->cm_fields[eMesageText]);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
/*
* Try to match from a friendly name (the "fn" field). If there is
/*
* Try to match from a friendly name (the "fn" field). If there is
diff --git
a/citadel/modules/calendar/serv_calendar.c
b/citadel/modules/calendar/serv_calendar.c
index e6b4fb4b097a93ccba07312525ecb11935522199..adf3600f06a75bf87ba2068c07161f2b5f230ad7 100644
(file)
--- a/
citadel/modules/calendar/serv_calendar.c
+++ b/
citadel/modules/calendar/serv_calendar.c
@@
-159,7
+159,7
@@
void ical_write_to_cal(struct ctdluser *u, icalcomponent *cal) {
/* Now write the data */
CtdlSubmitMsg(msg, NULL, "", QP_EADDR);
/* Now write the data */
CtdlSubmitMsg(msg, NULL, "", QP_EADDR);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
/* In either case, now we can free the serialized calendar object */
}
/* In either case, now we can free the serialized calendar object */
@@
-311,7
+311,7
@@
void ical_send_a_reply(icalcomponent *request, char *action) {
if (msg != NULL) {
valid = validate_recipients(organizer_string, NULL, 0);
CtdlSubmitMsg(msg, valid, "", QP_EADDR);
if (msg != NULL) {
valid = validate_recipients(organizer_string, NULL, 0);
CtdlSubmitMsg(msg, valid, "", QP_EADDR);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
free_recipients(valid);
}
}
free_recipients(valid);
}
}
@@
-396,7
+396,7
@@
void ical_respond(long msgnum, char *partnum, char *action) {
/* We're done with the incoming message, because we now have a
* calendar object in memory.
*/
/* We're done with the incoming message, because we now have a
* calendar object in memory.
*/
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
/*
* Here is the real meat of this function. Handle the event.
/*
* Here is the real meat of this function. Handle the event.
@@
-648,7
+648,7
@@
int ical_update_my_calendar_with_reply(icalcomponent *cal) {
&oec, /* user data */
0
);
&oec, /* user data */
0
);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
original_event = oec.c;
if (original_event == NULL) {
original_event = oec.c;
if (original_event == NULL) {
@@
-688,7
+688,7
@@
int ical_update_my_calendar_with_reply(icalcomponent *cal) {
if (msg != NULL) {
CIT_ICAL->avoid_sending_invitations = 1;
CtdlSubmitMsg(msg, NULL, roomname, QP_EADDR);
if (msg != NULL) {
CIT_ICAL->avoid_sending_invitations = 1;
CtdlSubmitMsg(msg, NULL, roomname, QP_EADDR);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
CIT_ICAL->avoid_sending_invitations = 0;
}
}
CIT_ICAL->avoid_sending_invitations = 0;
}
}
@@
-739,7
+739,7
@@
void ical_handle_rsvp(long msgnum, char *partnum, char *action) {
/* We're done with the incoming message, because we now have a
* calendar object in memory.
*/
/* We're done with the incoming message, because we now have a
* calendar object in memory.
*/
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
/*
* Here is the real meat of this function. Handle the event.
/*
* Here is the real meat of this function. Handle the event.
@@
-1167,7
+1167,7
@@
void ical_hunt_for_conflicts_backend(long msgnum, void *data) {
(void *) &ird, /* user data */
0
);
(void *) &ird, /* user data */
0
);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
if (ird.cal == NULL) return;
if (ird.cal == NULL) return;
@@
-1237,7
+1237,7
@@
void ical_conflicts(long msgnum, char *partnum) {
0
);
0
);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
if (ird.cal != NULL) {
ical_hunt_for_conflicts(ird.cal);
if (ird.cal != NULL) {
ical_hunt_for_conflicts(ird.cal);
@@
-1417,7
+1417,7
@@
void ical_freebusy_backend(long msgnum, void *data) {
(void *) &ird, /* user data */
0
);
(void *) &ird, /* user data */
0
);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
if (ird.cal) {
ical_add_to_freebusy(fb, ird.cal); /* Add VEVENT times to VFREEBUSY */
if (ird.cal) {
ical_add_to_freebusy(fb, ird.cal); /* Add VEVENT times to VFREEBUSY */
@@
-1618,7
+1618,7
@@
void ical_getics_backend(long msgnum, void *data) {
(void *) &ird, /* user data */
0
);
(void *) &ird, /* user data */
0
);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
if (ird.cal == NULL) return;
if (ird.cal == NULL) return;
@@
-2210,7
+2210,7
@@
void ical_send_out_invitations(icalcomponent *top_level_cal, icalcomponent *cal)
if (msg != NULL) {
valid = validate_recipients(attendees_string, NULL, 0);
CtdlSubmitMsg(msg, valid, "", QP_EADDR);
if (msg != NULL) {
valid = validate_recipients(attendees_string, NULL, 0);
CtdlSubmitMsg(msg, valid, "", QP_EADDR);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
free_recipients(valid);
}
}
free_recipients(valid);
}
}
diff --git
a/citadel/modules/expire/serv_expire.c
b/citadel/modules/expire/serv_expire.c
index 93ad7e31340cb8cb41728a50e6f880727e027e27..583b86dd504019e844aa0ccbe9c5a906b246b976 100644
(file)
--- a/
citadel/modules/expire/serv_expire.c
+++ b/
citadel/modules/expire/serv_expire.c
@@
-200,7
+200,7
@@
void GatherPurgeMessages(struct ctdlroom *qrbuf, void *data) {
msg = CtdlFetchMessage(delnum, 0); /* dont need body */
if (msg != NULL) {
xtime = atol(msg->cm_fields[eTimestamp]);
msg = CtdlFetchMessage(delnum, 0); /* dont need body */
if (msg != NULL) {
xtime = atol(msg->cm_fields[eTimestamp]);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
} else {
xtime = 0L;
}
} else {
xtime = 0L;
}
@@
-773,7
+773,7
@@
int PurgeEuidIndexTable(void) {
msg = CtdlFetchMessage(msgnum, 0);
if (msg != NULL) {
msg = CtdlFetchMessage(msgnum, 0);
if (msg != NULL) {
- C
tdlFreeMessag
e(msg); /* it still exists, so do nothing */
+ C
M_Fre
e(msg); /* it still exists, so do nothing */
}
else {
eptr = (struct EPurgeList *) malloc(sizeof(struct EPurgeList));
}
else {
eptr = (struct EPurgeList *) malloc(sizeof(struct EPurgeList));
diff --git
a/citadel/modules/extnotify/extnotify_main.c
b/citadel/modules/extnotify/extnotify_main.c
index 3eced5a59967aaff2c5211dcb576936968e5ba4b..ef253c8760455a6f52ec312a817b8807b7b1b955 100644
(file)
--- a/
citadel/modules/extnotify/extnotify_main.c
+++ b/
citadel/modules/extnotify/extnotify_main.c
@@
-193,7
+193,7
@@
eNotifyType extNotify_getConfigMessage(char *username,
{
break;
}
{
break;
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
msg = NULL;
}
}
msg = NULL;
}
}
@@
-206,7
+206,7
@@
eNotifyType extNotify_getConfigMessage(char *username,
// type. This string would be at the very top of the message contents.
CM_GetAsField(msg, eMesageText, &configMsg, &clen);
// type. This string would be at the very top of the message contents.
CM_GetAsField(msg, eMesageText, &configMsg, &clen);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
/* here we would find the pager number... */
pch = strchr(configMsg, '\n');
/* here we would find the pager number... */
pch = strchr(configMsg, '\n');
@@
-372,7
+372,7
@@
void process_notify(long NotifyMsgnum, void *usrdata)
}
if (FreeMe != NULL)
free(FreeMe);
}
if (FreeMe != NULL)
free(FreeMe);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
todelete[0] = NotifyMsgnum;
CtdlDeleteMessages(FNBL_QUEUE_ROOM, todelete, 1, "");
}
todelete[0] = NotifyMsgnum;
CtdlDeleteMessages(FNBL_QUEUE_ROOM, todelete, 1, "");
}
diff --git
a/citadel/modules/fulltext/serv_fulltext.c
b/citadel/modules/fulltext/serv_fulltext.c
index 7943e344cc87a392c0947917e1374f7249b35318..6288bfc9ab99adb0a240c99b739aab54da32622e 100644
(file)
--- a/
citadel/modules/fulltext/serv_fulltext.c
+++ b/
citadel/modules/fulltext/serv_fulltext.c
@@
-128,7
+128,7
@@
void ft_index_message(long msgnum, int op) {
if (!CM_IsEmpty(msg, eSuppressIdx)) {
syslog(LOG_DEBUG, "ft_index_message() excluded msg %ld", msgnum);
if (!CM_IsEmpty(msg, eSuppressIdx)) {
syslog(LOG_DEBUG, "ft_index_message() excluded msg %ld", msgnum);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
return;
}
return;
}
@@
-139,7
+139,7
@@
void ft_index_message(long msgnum, int op) {
*/
CC->redirect_buffer = NewStrBufPlain(NULL, SIZ);
CtdlOutputPreLoadedMsg(msg, MT_CITADEL, HEADERS_ALL, 0, 1, 0);
*/
CC->redirect_buffer = NewStrBufPlain(NULL, SIZ);
CtdlOutputPreLoadedMsg(msg, MT_CITADEL, HEADERS_ALL, 0, 1, 0);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
msgtext = CC->redirect_buffer;
CC->redirect_buffer = NULL;
if (msgtext != NULL) {
msgtext = CC->redirect_buffer;
CC->redirect_buffer = NULL;
if (msgtext != NULL) {
diff --git
a/citadel/modules/imap/imap_fetch.c
b/citadel/modules/imap/imap_fetch.c
index eb36ff9b38864062a99a1bdd30ed18bcd9457d2a..ed7f271651c79a7c71dc1801c8747fbfc7fd6240 100644
(file)
--- a/
citadel/modules/imap/imap_fetch.c
+++ b/
citadel/modules/imap/imap_fetch.c
@@
-790,7
+790,7
@@
void imap_fetch_body(long msgnum, ConstStr item, int is_peek) {
iaputs(&Imap->cached_body[pstart], pbytes);
if (msg != NULL) {
iaputs(&Imap->cached_body[pstart], pbytes);
if (msg != NULL) {
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
/* Mark this message as "seen" *unless* this is a "peek" operation */
}
/* Mark this message as "seen" *unless* this is a "peek" operation */
@@
-1084,7
+1084,7
@@
void imap_do_fetch_msg(int seq, citimap_command *Cmd) {
*/
else if (!strcasecmp(Cmd->Params[i].Key, "BODYSTRUCTURE")) {
if ((msg != NULL) && (!body_loaded)) {
*/
else if (!strcasecmp(Cmd->Params[i].Key, "BODYSTRUCTURE")) {
if ((msg != NULL) && (!body_loaded)) {
- C
tdlFreeMessag
e(msg); /* need the whole thing */
+ C
M_Fre
e(msg); /* need the whole thing */
msg = NULL;
}
if (msg == NULL) {
msg = NULL;
}
if (msg == NULL) {
@@
-1115,7
+1115,7
@@
void imap_do_fetch_msg(int seq, citimap_command *Cmd) {
IAPuts(")\r\n");
unbuffer_output();
if (msg != NULL) {
IAPuts(")\r\n");
unbuffer_output();
if (msg != NULL) {
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
}
}
diff --git
a/citadel/modules/imap/imap_misc.c
b/citadel/modules/imap/imap_misc.c
index be0fa51edd252a523f78ad2271c69cd9c3d2d8a8..14d2396c7e54480329f006906ca78abb620f0fa2 100644
(file)
--- a/
citadel/modules/imap/imap_misc.c
+++ b/
citadel/modules/imap/imap_misc.c
@@
-427,7
+427,7
@@
void imap_append(int num_parms, ConstStr *Params) {
}
/* We don't need this buffer anymore */
}
/* We don't need this buffer anymore */
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
if (new_message_flags != NULL) {
imap_do_append_flags(new_msgnum, new_message_flags);
if (new_message_flags != NULL) {
imap_do_append_flags(new_msgnum, new_message_flags);
diff --git
a/citadel/modules/imap/imap_search.c
b/citadel/modules/imap/imap_search.c
index aaa02dbe23260e4c3fbd8e22aa3317552b09df0f..0697441d50bc9403ce21e7e2361ace491bee67aa 100644
(file)
--- a/
citadel/modules/imap/imap_search.c
+++ b/
citadel/modules/imap/imap_search.c
@@
-531,7
+531,7
@@
int imap_do_search_msg(int seq, struct CtdlMessage *supplied_msg,
}
if (need_to_free_msg) {
}
if (need_to_free_msg) {
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
return(match);
}
}
return(match);
}
diff --git
a/citadel/modules/inetcfg/serv_inetcfg.c
b/citadel/modules/inetcfg/serv_inetcfg.c
index 44e1a4c0149fb24db782a89c949e89c694746c06..7c0bedaa10aaf1cd89604a9c463b09f6c71b8e7f 100644
(file)
--- a/
citadel/modules/inetcfg/serv_inetcfg.c
+++ b/
citadel/modules/inetcfg/serv_inetcfg.c
@@
-122,7
+122,7
@@
void inetcfg_init_backend(long msgnum, void *userdata) {
msg = CtdlFetchMessage(msgnum, 1);
if (msg != NULL) {
inetcfg_setTo(msg);
msg = CtdlFetchMessage(msgnum, 1);
if (msg != NULL) {
inetcfg_setTo(msg);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
}
}
diff --git
a/citadel/modules/instmsg/serv_instmsg.c
b/citadel/modules/instmsg/serv_instmsg.c
index 9a75e281ccb7c0f9d8371cedff15dba0f9084391..72f3256dee2185293635ec91a9f0787982cca63d 100644
(file)
--- a/
citadel/modules/instmsg/serv_instmsg.c
+++ b/
citadel/modules/instmsg/serv_instmsg.c
@@
-483,7
+483,7
@@
void flush_individual_conversation(struct imlog *im) {
snprintf(roomname, sizeof roomname, "%010ld.%s", im->usernums[1], PAGELOGROOM);
CtdlCreateRoom(roomname, 5, "", 0, 1, 1, VIEW_BBS);
msgnum = CtdlSubmitMsg(msg, NULL, roomname, 0);
snprintf(roomname, sizeof roomname, "%010ld.%s", im->usernums[1], PAGELOGROOM);
CtdlCreateRoom(roomname, 5, "", 0, 1, 1, VIEW_BBS);
msgnum = CtdlSubmitMsg(msg, NULL, roomname, 0);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
/* If there is a valid user number in usernums[0], save a copy for them too. */
if (im->usernums[0] > 0) {
/* If there is a valid user number in usernums[0], save a copy for them too. */
if (im->usernums[0] > 0) {
diff --git
a/citadel/modules/migrate/serv_migrate.c
b/citadel/modules/migrate/serv_migrate.c
index 41a2fdf2497d3dc323e078292367069e235eaca0..91815fa798142f1234dcec5661e5adca06bd5809 100644
(file)
--- a/
citadel/modules/migrate/serv_migrate.c
+++ b/
citadel/modules/migrate/serv_migrate.c
@@
-298,7
+298,7
@@
void migr_export_message(long msgnum) {
client_write("<msg_text>", 10);
serialize_message(&smr, msg);
client_write("<msg_text>", 10);
serialize_message(&smr, msg);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
/* Predict the buffer size we need. Expand the buffer if necessary. */
int encoded_len = smr.len * 15 / 10 ;
/* Predict the buffer size we need. Expand the buffer if necessary. */
int encoded_len = smr.len * 15 / 10 ;
diff --git
a/citadel/modules/network/serv_netmail.c
b/citadel/modules/network/serv_netmail.c
index 287436bbfa0bc535745352b27e2fbf358b9d1708..f0ca8d9288b3ef7ded94c1ede2196ecbedc3baba 100644
(file)
--- a/
citadel/modules/network/serv_netmail.c
+++ b/
citadel/modules/network/serv_netmail.c
@@
-239,7
+239,7
@@
void network_deliver_digest(SpoolControl *sc)
valid->envelope_from = strdup(bounce_to);
CtdlSubmitMsg(msg, valid, NULL, 0);
}
valid->envelope_from = strdup(bounce_to);
CtdlSubmitMsg(msg, valid, NULL, 0);
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
free_recipients(valid);
}
free_recipients(valid);
}
@@
-256,7
+256,7
@@
void network_process_digest(SpoolControl *sc, struct CtdlMessage *omsg, long *de
(sc->digestfp == NULL))
return;
(sc->digestfp == NULL))
return;
- msg = C
tdlDuplicateMessag
e(omsg);
+ msg = C
M_Duplicat
e(omsg);
if (msg != NULL) {
fprintf(sc->digestfp,
" -----------------------------------"
if (msg != NULL) {
fprintf(sc->digestfp,
" -----------------------------------"
@@
-304,7
+304,7
@@
void network_process_digest(SpoolControl *sc, struct CtdlMessage *omsg, long *de
FreeStrBuf(&CC->redirect_buffer);
sc->num_msgs_spooled += 1;
FreeStrBuf(&CC->redirect_buffer);
sc->num_msgs_spooled += 1;
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
}
}
@@
-324,7
+324,7
@@
void network_process_list(SpoolControl *sc, struct CtdlMessage *omsg, long *dele
* in order to insert the [list name] in it, etc.
*/
* in order to insert the [list name] in it, etc.
*/
- msg = C
tdlDuplicateMessag
e(omsg);
+ msg = C
M_Duplicat
e(omsg);
CM_SetField(msg, eListID, SKEY(sc->Users[roommailalias]));
CM_SetField(msg, eListID, SKEY(sc->Users[roommailalias]));
@@
-347,7
+347,7
@@
void network_process_list(SpoolControl *sc, struct CtdlMessage *omsg, long *dele
/* Handle delivery */
network_deliver_list(msg, sc, CC->room.QRname);
/* Handle delivery */
network_deliver_list(msg, sc, CC->room.QRname);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
/*
}
/*
@@
-377,7
+377,7
@@
void network_deliver_list(struct CtdlMessage *msg, SpoolControl *sc, const char
CtdlSubmitMsg(msg, valid, NULL, 0);
free_recipients(valid);
}
CtdlSubmitMsg(msg, valid, NULL, 0);
free_recipients(valid);
}
- /* Do not call C
tdlFreeMessag
e(msg) here; the caller will free it. */
+ /* Do not call C
M_Fre
e(msg) here; the caller will free it. */
}
}
@@
-394,7
+394,7
@@
void network_process_participate(SpoolControl *sc, struct CtdlMessage *omsg, lon
if (sc->Users[participate] == NULL)
return;
if (sc->Users[participate] == NULL)
return;
- msg = C
tdlDuplicateMessag
e(omsg);
+ msg = C
M_Duplicat
e(omsg);
/* Only send messages which originated on our own
* Citadel network, otherwise we'll end up sending the
/* Only send messages which originated on our own
* Citadel network, otherwise we'll end up sending the
@@
-434,7
+434,7
@@
void network_process_participate(SpoolControl *sc, struct CtdlMessage *omsg, lon
free_recipients(valid);
}
FreeStrBuf(&Buf);
free_recipients(valid);
}
FreeStrBuf(&Buf);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
void network_process_ignetpush(SpoolControl *sc, struct CtdlMessage *omsg, long *delete_after_send)
}
void network_process_ignetpush(SpoolControl *sc, struct CtdlMessage *omsg, long *delete_after_send)
@@
-459,7
+459,7
@@
void network_process_ignetpush(SpoolControl *sc, struct CtdlMessage *omsg, long
/*
* Process IGnet push shares
*/
/*
* Process IGnet push shares
*/
- msg = C
tdlDuplicateMessag
e(omsg);
+ msg = C
M_Duplicat
e(omsg);
/* Prepend our node name to the Path field whenever
* sending a message to another IGnet node
/* Prepend our node name to the Path field whenever
* sending a message to another IGnet node
@@
-578,7
+578,7
@@
void network_process_ignetpush(SpoolControl *sc, struct CtdlMessage *omsg, long
FreeStrBuf(&Buf);
FreeStrBuf(&Recipient);
FreeStrBuf(&RemoteRoom);
FreeStrBuf(&Buf);
FreeStrBuf(&Recipient);
FreeStrBuf(&RemoteRoom);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
@@
-609,7
+609,7
@@
void network_spool_msg(long msgnum,
network_process_participate(sc, msg, &delete_after_send);
network_process_ignetpush(sc, msg, &delete_after_send);
network_process_participate(sc, msg, &delete_after_send);
network_process_ignetpush(sc, msg, &delete_after_send);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
/* update lastsent */
sc->lastsent = msgnum;
/* update lastsent */
sc->lastsent = msgnum;
diff --git
a/citadel/modules/network/serv_netspool.c
b/citadel/modules/network/serv_netspool.c
index 586b945da602211353986efa4f10609f0e841f66..a309a0b7c4a0f93d2eeb2c46a59192a29eb39e2f 100644
(file)
--- a/
citadel/modules/network/serv_netspool.c
+++ b/
citadel/modules/network/serv_netspool.c
@@
-497,7
+497,7
@@
void network_process_buffer(char *buffer, long size, HashList *working_ignetcfg,
QN_syslog(LOG_ERR, "%s: %s\n", filename, strerror(errno));
}
free(sermsg.ser);
QN_syslog(LOG_ERR, "%s: %s\n", filename, strerror(errno));
}
free(sermsg.ser);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
FreeStrBuf(&Buf);
return;
}
FreeStrBuf(&Buf);
return;
}
@@
-522,7
+522,7
@@
void network_process_buffer(char *buffer, long size, HashList *working_ignetcfg,
* connected that it's inevitable.)
*/
if (network_usetable(msg) != 0) {
* connected that it's inevitable.)
*/
if (network_usetable(msg) != 0) {
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
return;
}
return;
}
@@
-572,7
+572,7
@@
void network_process_buffer(char *buffer, long size, HashList *working_ignetcfg,
msg->cm_flags = CM_SKIP_HOOKS;
CtdlSubmitMsg(msg, recp, target_room, 0);
}
msg->cm_flags = CM_SKIP_HOOKS;
CtdlSubmitMsg(msg, recp, target_room, 0);
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
free_recipients(recp);
}
free_recipients(recp);
}
diff --git
a/citadel/modules/network/serv_network.c
b/citadel/modules/network/serv_network.c
index 8533d8410fce7e0954b5561c8a701dde34859689..c0baa5f9a342f33955936dbd55bf831016262a0f 100644
(file)
--- a/
citadel/modules/network/serv_network.c
+++ b/
citadel/modules/network/serv_network.c
@@
-416,7
+416,7
@@
void network_bounce(struct CtdlMessage *msg, char *reason)
/* Clean up */
if (valid != NULL) free_recipients(valid);
/* Clean up */
if (valid != NULL) free_recipients(valid);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
QNM_syslog(LOG_DEBUG, "leaving network_bounce()\n");
}
QNM_syslog(LOG_DEBUG, "leaving network_bounce()\n");
}
diff --git
a/citadel/modules/pop3client/serv_pop3client.c
b/citadel/modules/pop3client/serv_pop3client.c
index 8a12d15037402f33a7d000665b0b9a577e0053aa..9fe2cd6b2546badcc17c7eb7beb691aecd645d2b 100644
(file)
--- a/
citadel/modules/pop3client/serv_pop3client.c
+++ b/
citadel/modules/pop3client/serv_pop3client.c
@@
-613,7
+613,7
@@
eNextState POP3C_SaveMsg(AsyncIO *IO)
* so we don't fetch this message again
*/
}
* so we don't fetch this message again
*/
}
- C
tdlFreeMessag
e(RecvMsg->CurrMsg->Msg);
+ C
M_Fre
e(RecvMsg->CurrMsg->Msg);
RecvMsg->count ++;
return NextDBOperation(&RecvMsg->IO, POP3C_StoreMsgRead);
RecvMsg->count ++;
return NextDBOperation(&RecvMsg->IO, POP3C_StoreMsgRead);
diff --git
a/citadel/modules/rssclient/rss_atom_parser.c
b/citadel/modules/rssclient/rss_atom_parser.c
index 254b6e5d70f48c82184080ae7a2975bcd786d2dc..982869d314d03891198d9bc7c373a33c38cdb8ca 100644
(file)
--- a/
citadel/modules/rssclient/rss_atom_parser.c
+++ b/
citadel/modules/rssclient/rss_atom_parser.c
@@
-602,7
+602,7
@@
void FreeNetworkSaveMessage (void *vMsg)
{
networker_save_message *Msg = (networker_save_message *) vMsg;
{
networker_save_message *Msg = (networker_save_message *) vMsg;
- C
tdlFreeMessag
eContents(&Msg->Msg);
+ C
M_Fre
eContents(&Msg->Msg);
FreeStrBuf(&Msg->Message);
FreeStrBuf(&Msg->MsgGUID);
FreeStrBuf(&Msg->Message);
FreeStrBuf(&Msg->MsgGUID);
diff --git
a/citadel/modules/sieve/serv_sieve.c
b/citadel/modules/sieve/serv_sieve.c
index a1b6f40080ab4852759ea17dbc2ca96b57c2aae0..ecdaafd78b819b8e19ee9f80c7ae21f1b3409291 100644
(file)
--- a/
citadel/modules/sieve/serv_sieve.c
+++ b/
citadel/modules/sieve/serv_sieve.c
@@
-134,7
+134,7
@@
int ctdl_redirect(sieve2_context_t *s, void *my)
CtdlSubmitMsg(msg, valid, NULL, 0);
cs->cancel_implicit_keep = 1;
free_recipients(valid);
CtdlSubmitMsg(msg, valid, NULL, 0);
cs->cancel_implicit_keep = 1;
free_recipients(valid);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
return SIEVE2_OK;
}
return SIEVE2_OK;
}
@@
-655,7
+655,7
@@
void sieve_do_msg(long msgnum, void *userdata) {
strcat(my.envelope_to, config.c_fqdn);
}
strcat(my.envelope_to, config.c_fqdn);
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
SVM_syslog(LOG_DEBUG, "Calling sieve2_execute()");
res = sieve2_execute(sieve2_context, &my);
SVM_syslog(LOG_DEBUG, "Calling sieve2_execute()");
res = sieve2_execute(sieve2_context, &my);
@@
-757,7
+757,7
@@
void get_sieve_config_backend(long msgnum, void *userdata) {
CM_GetAsField(msg, eMesageText, &conf, &conflen);
CM_GetAsField(msg, eMesageText, &conf, &conflen);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
if (conf != NULL) {
parse_sieve_config(conf, u);
if (conf != NULL) {
parse_sieve_config(conf, u);
diff --git
a/citadel/modules/smtp/serv_smtp.c
b/citadel/modules/smtp/serv_smtp.c
index 44fa78804c39283a5cd9d22c1e12d9fb580c3848..f21e9d16ecd55c82de1a2a4f9c414314b393c12e 100644
(file)
--- a/
citadel/modules/smtp/serv_smtp.c
+++ b/
citadel/modules/smtp/serv_smtp.c
@@
-327,7
+327,7
@@
void smtp_webcit_preferences_hack_backend(long msgnum, void *userdata) {
*webcit_conf = (char *)msg->cm_fields[eMesageText];
msg->cm_fields[eMesageText] = NULL;
}
*webcit_conf = (char *)msg->cm_fields[eMesageText];
msg->cm_fields[eMesageText] = NULL;
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
@@
-923,7
+923,7
@@
void smtp_data(long offset, long flags)
);
/* Clean up */
);
/* Clean up */
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
free_recipients(valid);
smtp_data_clear(0, 0); /* clear out the buffers now */
}
free_recipients(valid);
smtp_data_clear(0, 0); /* clear out the buffers now */
}
diff --git
a/citadel/modules/smtp/serv_smtpeventclient.c
b/citadel/modules/smtp/serv_smtpeventclient.c
index de7aafb7e9154b2465909939309f4ff93ad05d3e..47c1d605e525c213424501448f51e3d3d2e3335a 100644
(file)
--- a/
citadel/modules/smtp/serv_smtpeventclient.c
+++ b/
citadel/modules/smtp/serv_smtpeventclient.c
@@
-227,7
+227,7
@@
eNextState FinalizeMessageSend_DB(AsyncIO *IO)
Msg->MyQItem->QueMsgID =
CtdlSubmitMsg(msg, NULL, SMTP_SPOOLOUT_ROOM, QP_EADDR);
EVS_syslog(LOG_DEBUG, "%ld", Msg->MyQItem->QueMsgID);
Msg->MyQItem->QueMsgID =
CtdlSubmitMsg(msg, NULL, SMTP_SPOOLOUT_ROOM, QP_EADDR);
EVS_syslog(LOG_DEBUG, "%ld", Msg->MyQItem->QueMsgID);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
else {
CtdlDeleteMessages(SMTP_SPOOLOUT_ROOM,
}
else {
CtdlDeleteMessages(SMTP_SPOOLOUT_ROOM,
diff --git
a/citadel/modules/smtp/serv_smtpqueue.c
b/citadel/modules/smtp/serv_smtpqueue.c
index 685e2ca7685e8819cb7cbcdb06733d71c15b4b07..1a5761b6bf720d3bb25fb1d864cd7f8d1be0534d 100644
(file)
--- a/
citadel/modules/smtp/serv_smtpqueue.c
+++ b/
citadel/modules/smtp/serv_smtpqueue.c
@@
-730,7
+730,7
@@
void smtpq_do_bounce(OneQueItem *MyQItem, StrBuf *OMsgTxt, ParsedURL *Relay)
/* Free up the memory we used */
free_recipients(valid);
FreeStrBuf(&boundary);
/* Free up the memory we used */
free_recipients(valid);
FreeStrBuf(&boundary);
- C
tdlFreeMessag
e(bmsg);
+ C
M_Fre
e(bmsg);
SMTPCM_syslog(LOG_DEBUG, "Done processing bounces\n");
}
SMTPCM_syslog(LOG_DEBUG, "Done processing bounces\n");
}
@@
-859,7
+859,7
@@
void smtp_do_procmsg(long msgnum, void *userdata) {
}
}
PlainQItem = NewStrBufPlain(instr, -1);
}
}
PlainQItem = NewStrBufPlain(instr, -1);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
MyQItem = DeserializeQueueItem(PlainQItem, msgnum);
FreeStrBuf(&PlainQItem);
MyQItem = DeserializeQueueItem(PlainQItem, msgnum);
FreeStrBuf(&PlainQItem);
diff --git
a/citadel/modules/smtp/smtp_util.c
b/citadel/modules/smtp/smtp_util.c
index 6dcf95fb01d8e716b509300a3e0cba74a709766a..d6633fb564799bc3051fa614a021b95c9b663c54 100644
(file)
--- a/
citadel/modules/smtp/smtp_util.c
+++ b/
citadel/modules/smtp/smtp_util.c
@@
-318,6
+318,6
@@
void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
}
}
FreeStrBuf(&boundary);
}
}
FreeStrBuf(&boundary);
- C
tdlFreeMessag
e(bmsg);
+ C
M_Fre
e(bmsg);
syslog(LOG_DEBUG, "Done processing bounces\n");
}
syslog(LOG_DEBUG, "Done processing bounces\n");
}
diff --git
a/citadel/modules/vcard/serv_vcard.c
b/citadel/modules/vcard/serv_vcard.c
index 9f493a65d8f1ad63c7762ad9b586203ccd7f2a4e..9b49782bfcc69c051991844808ba8580cc5d2859 100644
(file)
--- a/
citadel/modules/vcard/serv_vcard.c
+++ b/
citadel/modules/vcard/serv_vcard.c
@@
-189,7
+189,7
@@
void vcard_add_to_directory(long msgnum, void *data) {
vcard_extract_internet_addresses(msg, vcard_directory_add_user);
}
vcard_extract_internet_addresses(msg, vcard_directory_add_user);
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
@@
-650,7
+650,7
@@
struct vCard *vcard_get_user(struct ctdluser *u) {
if (msg == NULL) return vcard_new();
v = vcard_load(msg->cm_fields[eMesageText]);
if (msg == NULL) return vcard_new();
v = vcard_load(msg->cm_fields[eMesageText]);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
return v;
}
return v;
}
@@
-915,7
+915,7
@@
void vcard_purge(struct ctdluser *usbuf) {
CM_SetField(msg, eSpecialField, HKEY("CANCEL"));
CtdlSubmitMsg(msg, NULL, ADDRESS_BOOK_ROOM, QP_EADDR);
CM_SetField(msg, eSpecialField, HKEY("CANCEL"));
CtdlSubmitMsg(msg, NULL, ADDRESS_BOOK_ROOM, QP_EADDR);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
@@
-998,7
+998,7
@@
void vcard_delete_remove(char *room, long msgnum) {
if (ptr != NULL) ++ptr;
}
if (ptr != NULL) ++ptr;
}
-EOH: C
tdlFreeMessag
e(msg);
+EOH: C
M_Fre
e(msg);
}
}
@@
-1113,7
+1113,7
@@
void dvca_callback(long msgnum, void *userdata) {
NULL, /* user data */
0
);
NULL, /* user data */
0
);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
@@
-1330,7
+1330,7
@@
void strip_addresses_already_have(long msgnum, void *userdata) {
msg = CtdlFetchMessage(msgnum, 1);
if (msg == NULL) return;
v = vcard_load(msg->cm_fields[eMesageText]);
msg = CtdlFetchMessage(msgnum, 1);
if (msg == NULL) return;
v = vcard_load(msg->cm_fields[eMesageText]);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
i = 0;
while (value = vcard_get_prop(v, "email", 1, i++, 0), value != NULL) {
i = 0;
while (value = vcard_get_prop(v, "email", 1, i++, 0), value != NULL) {
@@
-1403,7
+1403,7
@@
void store_this_ha(struct addresses_to_be_filed *aptr) {
syslog(LOG_DEBUG, "Adding contact: %s", recipient);
CtdlSubmitMsg(vmsg, NULL, aptr->roomname, QP_EADDR);
syslog(LOG_DEBUG, "Adding contact: %s", recipient);
CtdlSubmitMsg(vmsg, NULL, aptr->roomname, QP_EADDR);
- C
tdlFreeMessag
e(vmsg);
+ C
M_Fre
e(vmsg);
}
}
}
}
diff --git
a/citadel/modules/wiki/serv_wiki.c
b/citadel/modules/wiki/serv_wiki.c
index 052ab2ff37c2b7eb2a3394262043f4d7e2ea2c8d..e9db40985e506b7650d3ff87add358e6f5657963 100644
(file)
--- a/
citadel/modules/wiki/serv_wiki.c
+++ b/
citadel/modules/wiki/serv_wiki.c
@@
-132,13
+132,13
@@
int wiki_upload_beforesave(struct CtdlMessage *msg) {
}
if ((old_msg != NULL) && (CM_IsEmpty(old_msg, eMesageText))) { /* old version is corrupt? */
}
if ((old_msg != NULL) && (CM_IsEmpty(old_msg, eMesageText))) { /* old version is corrupt? */
- C
tdlFreeMessag
e(old_msg);
+ C
M_Fre
e(old_msg);
old_msg = NULL;
}
/* If no changes were made, don't bother saving it again */
if ((old_msg != NULL) && (!strcmp(msg->cm_fields[eMesageText], old_msg->cm_fields[eMesageText]))) {
old_msg = NULL;
}
/* If no changes were made, don't bother saving it again */
if ((old_msg != NULL) && (!strcmp(msg->cm_fields[eMesageText], old_msg->cm_fields[eMesageText]))) {
- C
tdlFreeMessag
e(old_msg);
+ C
M_Fre
e(old_msg);
return(1);
}
return(1);
}
@@
-153,7
+153,7
@@
int wiki_upload_beforesave(struct CtdlMessage *msg) {
fp = fopen(diff_old_filename, "w");
rv = fwrite(old_msg->cm_fields[eMesageText], strlen(old_msg->cm_fields[eMesageText]), 1, fp);
fclose(fp);
fp = fopen(diff_old_filename, "w");
rv = fwrite(old_msg->cm_fields[eMesageText], strlen(old_msg->cm_fields[eMesageText]), 1, fp);
fclose(fp);
- C
tdlFreeMessag
e(old_msg);
+ C
M_Fre
e(old_msg);
}
fp = fopen(diff_new_filename, "w");
}
fp = fopen(diff_new_filename, "w");
@@
-342,7
+342,7
@@
int wiki_upload_beforesave(struct CtdlMessage *msg) {
}
free(diffbuf);
}
free(diffbuf);
- C
tdlFreeMessag
e(history_msg);
+ C
M_Fre
e(history_msg);
return(0);
}
return(0);
}
@@
-395,7
+395,7
@@
void wiki_history(char *pagename) {
}
if ((msg != NULL) && CM_IsEmpty(msg, eMesageText)) {
}
if ((msg != NULL) && CM_IsEmpty(msg, eMesageText)) {
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
msg = NULL;
}
msg = NULL;
}
@@
-409,7
+409,7
@@
void wiki_history(char *pagename) {
mime_parser(msg->cm_fields[eMesageText], NULL, *wiki_history_callback, NULL, NULL, NULL, 0);
cprintf("000\n");
mime_parser(msg->cm_fields[eMesageText], NULL, *wiki_history_callback, NULL, NULL, NULL, 0);
cprintf("000\n");
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
return;
}
return;
}
@@
-527,7
+527,7
@@
void wiki_rev(char *pagename, char *rev, char *operation)
}
if ((msg != NULL) && CM_IsEmpty(msg, eMesageText)) {
}
if ((msg != NULL) && CM_IsEmpty(msg, eMesageText)) {
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
msg = NULL;
}
msg = NULL;
}
@@
-547,7
+547,7
@@
void wiki_rev(char *pagename, char *rev, char *operation)
else {
syslog(LOG_ALERT, "Cannot open %s: %s\n", temp, strerror(errno));
}
else {
syslog(LOG_ALERT, "Cannot open %s: %s\n", temp, strerror(errno));
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
/* Get the revision history */
/* Get the revision history */
@@
-561,7
+561,7
@@
void wiki_rev(char *pagename, char *rev, char *operation)
}
if ((msg != NULL) && CM_IsEmpty(msg, eMesageText)) {
}
if ((msg != NULL) && CM_IsEmpty(msg, eMesageText)) {
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
msg = NULL;
}
msg = NULL;
}
@@
-580,7
+580,7
@@
void wiki_rev(char *pagename, char *rev, char *operation)
striplt(hecbd.stop_when);
mime_parser(msg->cm_fields[eMesageText], NULL, *wiki_rev_callback, NULL, NULL, (void *)&hecbd, 0);
striplt(hecbd.stop_when);
mime_parser(msg->cm_fields[eMesageText], NULL, *wiki_rev_callback, NULL, NULL, (void *)&hecbd, 0);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
/* Were we successful? */
if (hecbd.done == 0) {
/* Were we successful? */
if (hecbd.done == 0) {
@@
-649,7
+649,7
@@
void wiki_rev(char *pagename, char *rev, char *operation)
/* Theoretically it is impossible to get here, but throw an error anyway */
msgnum = (-1L);
}
/* Theoretically it is impossible to get here, but throw an error anyway */
msgnum = (-1L);
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
if (msgnum >= 0L) {
cprintf("%d %ld\n", CIT_OK, msgnum); /* Give the client a msgnum */
}
if (msgnum >= 0L) {
cprintf("%d %ld\n", CIT_OK, msgnum); /* Give the client a msgnum */
}
diff --git
a/citadel/modules/xmpp/xmpp_presence.c
b/citadel/modules/xmpp/xmpp_presence.c
index 1fa5b1d12fa4ae9261437ee57e3551e10a6a29d1..ca8a95949d8d95b10dc7e8d679787ab072a600ac 100644
(file)
--- a/
citadel/modules/xmpp/xmpp_presence.c
+++ b/
citadel/modules/xmpp/xmpp_presence.c
@@
-259,7
+259,7
@@
void xmpp_fetch_mortuary_backend(long msgnum, void *userdata) {
}
}
}
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
diff --git
a/citadel/msgbase.c
b/citadel/msgbase.c
index 30d83361f3b4ab073476b615ae3f10a045359655..81c5231e6db881e819f87db3e2d5c3836bf60841 100644
(file)
--- a/
citadel/msgbase.c
+++ b/
citadel/msgbase.c
@@
-272,18
+272,18
@@
void CM_GetAsField(struct CtdlMessage *Msg, eMsgField which, char **ret, long *r
* Returns 1 if the supplied pointer points to a valid Citadel message.
* If the pointer is NULL or the magic number check fails, returns 0.
*/
* Returns 1 if the supplied pointer points to a valid Citadel message.
* If the pointer is NULL or the magic number check fails, returns 0.
*/
-int
is_valid_message
(struct CtdlMessage *msg) {
+int
CM_IsValidMsg
(struct CtdlMessage *msg) {
if (msg == NULL)
return 0;
if ((msg->cm_magic) != CTDLMESSAGE_MAGIC) {
struct CitContext *CCC = CC;
if (msg == NULL)
return 0;
if ((msg->cm_magic) != CTDLMESSAGE_MAGIC) {
struct CitContext *CCC = CC;
- MSGM_syslog(LOG_WARNING, "
is_valid_message
() -- self-check failed\n");
+ MSGM_syslog(LOG_WARNING, "
CM_IsValidMsg
() -- self-check failed\n");
return 0;
}
return 1;
}
return 0;
}
return 1;
}
-void C
tdlFreeMessag
eContents(struct CtdlMessage *msg)
+void C
M_Fre
eContents(struct CtdlMessage *msg)
{
int i;
{
int i;
@@
-297,18
+297,18
@@
void CtdlFreeMessageContents(struct CtdlMessage *msg)
/*
* 'Destructor' for struct CtdlMessage
*/
/*
* 'Destructor' for struct CtdlMessage
*/
-void C
tdlFreeMessag
e(struct CtdlMessage *msg)
+void C
M_Fre
e(struct CtdlMessage *msg)
{
{
- if (
is_valid_message
(msg) == 0)
+ if (
CM_IsValidMsg
(msg) == 0)
{
if (msg != NULL) free (msg);
return;
}
{
if (msg != NULL) free (msg);
return;
}
- C
tdlFreeMessag
eContents(msg);
+ C
M_Fre
eContents(msg);
free(msg);
}
free(msg);
}
-int
DupCM
Field(eMsgField i, struct CtdlMessage *OrgMsg, struct CtdlMessage *NewMsg)
+int
CM_Dup
Field(eMsgField i, struct CtdlMessage *OrgMsg, struct CtdlMessage *NewMsg)
{
long len;
len = strlen(OrgMsg->cm_fields[i]);
{
long len;
len = strlen(OrgMsg->cm_fields[i]);
@@
-320,12
+320,12
@@
int DupCMField(eMsgField i, struct CtdlMessage *OrgMsg, struct CtdlMessage *NewM
return 1;
}
return 1;
}
-struct CtdlMessage * C
tdlDuplicateMessag
e(struct CtdlMessage *OrgMsg)
+struct CtdlMessage * C
M_Duplicat
e(struct CtdlMessage *OrgMsg)
{
int i;
struct CtdlMessage *NewMsg;
{
int i;
struct CtdlMessage *NewMsg;
- if (
is_valid_message
(OrgMsg) == 0)
+ if (
CM_IsValidMsg
(OrgMsg) == 0)
return NULL;
NewMsg = (struct CtdlMessage *)malloc(sizeof(struct CtdlMessage));
if (NewMsg == NULL)
return NULL;
NewMsg = (struct CtdlMessage *)malloc(sizeof(struct CtdlMessage));
if (NewMsg == NULL)
@@
-339,9
+339,9
@@
struct CtdlMessage * CtdlDuplicateMessage(struct CtdlMessage *OrgMsg)
{
if (OrgMsg->cm_fields[i] != NULL)
{
{
if (OrgMsg->cm_fields[i] != NULL)
{
- if (!
DupCM
Field(i, OrgMsg, NewMsg))
+ if (!
CM_Dup
Field(i, OrgMsg, NewMsg))
{
{
- C
tdlFreeMessag
e(NewMsg);
+ C
M_Fre
e(NewMsg);
return NULL;
}
}
return NULL;
}
}
@@
-522,7
+522,7
@@
void headers_listing(long msgnum, void *userdata)
(!CM_IsEmpty(msg, erFc822Addr) ? msg->cm_fields[erFc822Addr] : ""),
(!CM_IsEmpty(msg, eMsgSubject) ? msg->cm_fields[eMsgSubject] : "")
);
(!CM_IsEmpty(msg, erFc822Addr) ? msg->cm_fields[erFc822Addr] : ""),
(!CM_IsEmpty(msg, eMsgSubject) ? msg->cm_fields[eMsgSubject] : "")
);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
/*
}
/*
@@
-542,7
+542,7
@@
void headers_euid(long msgnum, void *userdata)
msgnum,
(!CM_IsEmpty(msg, eExclusiveID) ? msg->cm_fields[eExclusiveID] : ""),
(!CM_IsEmpty(msg, eTimestamp) ? msg->cm_fields[eTimestamp] : "0"));
msgnum,
(!CM_IsEmpty(msg, eExclusiveID) ? msg->cm_fields[eExclusiveID] : ""),
(!CM_IsEmpty(msg, eTimestamp) ? msg->cm_fields[eTimestamp] : "0"));
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
@@
-942,7
+942,7
@@
int CtdlForEachMessage(int mode, long ref, char *search_string,
if (CtdlMsgCmp(msg, compare)) {
msglist[a] = 0L;
}
if (CtdlMsgCmp(msg, compare)) {
msglist[a] = 0L;
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
}
}
}
}
@@
-1152,7
+1152,7
@@
void cmd_msgs(char *cmdbuf)
template,
CallBack,
NULL);
template,
CallBack,
NULL);
- if (template != NULL) C
tdlFreeMessag
e(template);
+ if (template != NULL) C
M_Fre
e(template);
cprintf("000\n");
}
cprintf("000\n");
}
@@
-1502,7
+1502,7
@@
struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body)
/* Perform "before read" hooks (aborting if any return nonzero) */
if (PerformMessageHooks(ret, EVT_BEFOREREAD) > 0) {
/* Perform "before read" hooks (aborting if any return nonzero) */
if (PerformMessageHooks(ret, EVT_BEFOREREAD) > 0) {
- C
tdlFreeMessag
e(ret);
+ C
M_Fre
e(ret);
return NULL;
}
return NULL;
}
@@
-1948,7
+1948,7
@@
int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
*Address = TheMessage->cm_fields[erFc822Addr];
TheMessage->cm_fields[erFc822Addr] = NULL;
}
*Address = TheMessage->cm_fields[erFc822Addr];
TheMessage->cm_fields[erFc822Addr] = NULL;
}
- C
tdlFreeMessag
e(TheMessage);
+ C
M_Fre
e(TheMessage);
TheMessage = NULL;
if (encap.msg) {
TheMessage = NULL;
if (encap.msg) {
@@
-1988,7
+1988,7
@@
int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
TheMessage->cm_fields[erFc822Addr] = NULL;
}
TheMessage->cm_fields[erFc822Addr] = NULL;
}
- C
tdlFreeMessag
e(TheMessage);
+ C
M_Fre
e(TheMessage);
return(retcode);
}
return(retcode);
}
@@
-2523,7
+2523,7
@@
int CtdlOutputPreLoadedMsg(
strcpy(mid, "unknown");
nl = (crlf ? "\r\n" : "\n");
strcpy(mid, "unknown");
nl = (crlf ? "\r\n" : "\n");
- if (!
is_valid_message
(TheMessage)) {
+ if (!
CM_IsValidMsg
(TheMessage)) {
MSGM_syslog(LOG_ERR,
"ERROR: invalid preloaded message for output\n");
cit_backtrace ();
MSGM_syslog(LOG_ERR,
"ERROR: invalid preloaded message for output\n");
cit_backtrace ();
@@
-2813,7
+2813,7
@@
void cmd_msg3(char *cmdbuf)
}
serialize_message(&smr, msg);
}
serialize_message(&smr, msg);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
if (smr.len == 0) {
cprintf("%d Unable to serialize message\n",
if (smr.len == 0) {
cprintf("%d Unable to serialize message\n",
@@
-3027,7
+3027,7
@@
int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms
/* Free up the memory we may have allocated */
if (msg != supplied_msg) {
/* Free up the memory we may have allocated */
if (msg != supplied_msg) {
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
}
}
@@
-3173,7
+3173,7
@@
void serialize_message(struct ser_ret *ret, /* return values */
/*
* Check for valid message format
*/
/*
* Check for valid message format
*/
- if (
is_valid_message
(msg) == 0) {
+ if (
CM_IsValidMsg
(msg) == 0) {
MSGM_syslog(LOG_ERR, "serialize_message() aborting due to invalid message\n");
ret->len = 0;
ret->ser = NULL;
MSGM_syslog(LOG_ERR, "serialize_message() aborting due to invalid message\n");
ret->len = 0;
ret->ser = NULL;
@@
-3290,7
+3290,7
@@
long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */
int rv = 0;
MSGM_syslog(LOG_DEBUG, "CtdlSubmitMsg() called\n");
int rv = 0;
MSGM_syslog(LOG_DEBUG, "CtdlSubmitMsg() called\n");
- if (
is_valid_message(msg) == 0) return(-1);
/* self check */
+ if (
CM_IsValidMsg(msg) == 0) return(-1);
/* self check */
/* If this message has no timestamp, we take the liberty of
* giving it one, right now.
/* If this message has no timestamp, we take the liberty of
* giving it one, right now.
@@
-3529,7
+3529,7
@@
long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */
CM_SetAsField(imsg, eMesageText, &instr, instrlen);
CM_SetField(imsg, eExtnotify, recipient, recipientlen);
CtdlSubmitMsg(imsg, NULL, FNBL_QUEUE_ROOM, 0);
CM_SetAsField(imsg, eMesageText, &instr, instrlen);
CM_SetField(imsg, eExtnotify, recipient, recipientlen);
CtdlSubmitMsg(imsg, NULL, FNBL_QUEUE_ROOM, 0);
- C
tdlFreeMessag
e(imsg);
+ C
M_Fre
e(imsg);
}
}
else {
}
}
else {
@@
-3647,7
+3647,7
@@
long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */
imsg->cm_fields[eJournal] = strdup("do not journal");
imsg->cm_fields[eMesageText] = SmashStrBuf(&SpoolMsg); /* imsg owns this memory now */
CtdlSubmitMsg(imsg, NULL, SMTP_SPOOLOUT_ROOM, QP_EADDR);
imsg->cm_fields[eJournal] = strdup("do not journal");
imsg->cm_fields[eMesageText] = SmashStrBuf(&SpoolMsg); /* imsg owns this memory now */
CtdlSubmitMsg(imsg, NULL, SMTP_SPOOLOUT_ROOM, QP_EADDR);
- C
tdlFreeMessag
e(imsg);
+ C
M_Fre
e(imsg);
}
/*
}
/*
@@
-3753,7
+3753,7
@@
void quickie_message(const char *from,
msg->cm_fields[eMesageText] = strdup(text);
CtdlSubmitMsg(msg, recp, room, 0);
msg->cm_fields[eMesageText] = strdup(text);
CtdlSubmitMsg(msg, recp, room, 0);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
if (recp != NULL) free_recipients(recp);
}
if (recp != NULL) free_recipients(recp);
}
@@
-4090,7
+4090,7
@@
char *CtdlReadMessageBody(char *terminator, /* token signalling EOT */
* (NOTE: if you supply 'preformatted_text', the buffer you give it
* will become part of the message. This means you are no longer
* responsible for managing that memory -- it will be freed along with
* (NOTE: if you supply 'preformatted_text', the buffer you give it
* will become part of the message. This means you are no longer
* responsible for managing that memory -- it will be freed along with
- * the rest of the fields when C
tdlFreeMessag
e() is called.)
+ * the rest of the fields when C
M_Fre
e() is called.)
*/
struct CtdlMessage *CtdlMakeMessage(
*/
struct CtdlMessage *CtdlMakeMessage(
@@
-4926,7
+4926,7
@@
void cmd_ent0(char *entargs)
cprintf("000\n");
}
cprintf("000\n");
}
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
if (valid != NULL) {
free_recipients(valid);
}
if (valid != NULL) {
free_recipients(valid);
@@
-5611,7
+5611,7
@@
void CtdlWriteObject(char *req_room, /* Room to stuff it in */
}
/* Now write the data */
CtdlSubmitMsg(msg, NULL, roomname, 0);
}
/* Now write the data */
CtdlSubmitMsg(msg, NULL, roomname, 0);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
}
@@
-5653,7
+5653,7
@@
char *CtdlGetSysConfig(char *sysconfname) {
msg = CtdlFetchMessage(msgnum, 1);
if (msg != NULL) {
conf = strdup(msg->cm_fields[eMesageText]);
msg = CtdlFetchMessage(msgnum, 1);
if (msg != NULL) {
conf = strdup(msg->cm_fields[eMesageText]);
- C
tdlFreeMessag
e(msg);
+ C
M_Fre
e(msg);
}
else {
conf = NULL;
}
else {
conf = NULL;
diff --git
a/citadel/msgbase.h
b/citadel/msgbase.h
index e94b46deded550b4f1d6a13654b1238e2383b102..b1df41bfbd58612e7896514ac1fc191c200ae458 100644
(file)
--- a/
citadel/msgbase.h
+++ b/
citadel/msgbase.h
@@
-163,7
+163,8
@@
void CtdlWriteObject(char *req_room, /* Room to stuff it in */
unsigned int flags /* Internal save flags */
);
struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body);
unsigned int flags /* Internal save flags */
);
struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body);
-struct CtdlMessage * CtdlDuplicateMessage(struct CtdlMessage *OrgMsg);
+struct CtdlMessage * CM_Duplicate
+ (struct CtdlMessage *OrgMsg);
int CM_IsEmpty (struct CtdlMessage *Msg, eMsgField which);
void CM_SetField (struct CtdlMessage *Msg, eMsgField which, const char *buf, long length);
void CM_SetFieldLONG (struct CtdlMessage *Msg, eMsgField which, long lvalue);
int CM_IsEmpty (struct CtdlMessage *Msg, eMsgField which);
void CM_SetField (struct CtdlMessage *Msg, eMsgField which, const char *buf, long length);
void CM_SetFieldLONG (struct CtdlMessage *Msg, eMsgField which, long lvalue);
@@
-175,10
+176,11
@@
void CM_SetAsFieldSB (struct CtdlMessage *Msg, eMsgField which, StrBuf **buf);
void CM_GetAsField (struct CtdlMessage *Msg, eMsgField which, char **ret, long *retlen);
void CM_PrependToField (struct CtdlMessage *Msg, eMsgField which, const char *buf, long length);
void CM_GetAsField (struct CtdlMessage *Msg, eMsgField which, char **ret, long *retlen);
void CM_PrependToField (struct CtdlMessage *Msg, eMsgField which, const char *buf, long length);
-void CtdlFreeMessage(struct CtdlMessage *msg);
-void CtdlFreeMessageContents(struct CtdlMessage *msg);
+void CM_Free (struct CtdlMessage *msg);
+void CM_FreeContents (struct CtdlMessage *msg);
+int CM_IsValidMsg (struct CtdlMessage *msg);
+
void serialize_message(struct ser_ret *, struct CtdlMessage *);
void serialize_message(struct ser_ret *, struct CtdlMessage *);
-int is_valid_message(struct CtdlMessage *);
void ReplicationChecks(struct CtdlMessage *);
int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newmsgs,
int do_repl_check, struct CtdlMessage *supplied_msg, int suppress_refcount_adj);
void ReplicationChecks(struct CtdlMessage *);
int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newmsgs,
int do_repl_check, struct CtdlMessage *supplied_msg, int suppress_refcount_adj);