From e64a3711948fd273213f363aa7525188bd5cda68 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 25 Jan 2018 11:17:10 -0500 Subject: [PATCH] war on eNodeName --- citadel/modules/calendar/serv_calendar.c | 3 +-- citadel/modules/ctdlproto/serv_messages.c | 4 ++-- citadel/modules/instmsg/serv_instmsg.c | 3 +-- citadel/modules/sieve/serv_sieve.c | 5 +---- citadel/modules/smtp/serv_smtp.c | 1 - citadel/modules/smtp/smtp_util.c | 3 +-- citadel/modules/wiki/serv_wiki.c | 4 +--- citadel/msgbase.c | 12 ++++++------ 8 files changed, 13 insertions(+), 22 deletions(-) diff --git a/citadel/modules/calendar/serv_calendar.c b/citadel/modules/calendar/serv_calendar.c index b91600c08..b335dc1d9 100644 --- a/citadel/modules/calendar/serv_calendar.c +++ b/citadel/modules/calendar/serv_calendar.c @@ -3,7 +3,7 @@ * room on a Citadel server. It handles iCalendar objects using the * iTIP protocol. See RFCs 2445 and 2446. * - * Copyright (c) 1987-2015 by the citadel.org team + * Copyright (c) 1987-2018 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -143,7 +143,6 @@ void ical_write_to_cal(struct ctdluser *u, icalcomponent *cal) { msg->cm_format_type = 4; CM_SetField(msg, eAuthor, CCC->user.fullname, strlen(CCC->user.fullname)); CM_SetField(msg, eOriginalRoom, CCC->room.QRname, strlen(CCC->room.QRname)); - CM_SetField(msg, eNodeName, CtdlGetConfigStr("c_nodename"), strlen(CtdlGetConfigStr("c_nodename"))); CM_SetField(msg, eHumanNode, CtdlGetConfigStr("c_humannode"), strlen(CtdlGetConfigStr("c_humannode"))); MsgBody = NewStrBufPlain(NULL, serlen + 100); diff --git a/citadel/modules/ctdlproto/serv_messages.c b/citadel/modules/ctdlproto/serv_messages.c index 0ef0b033f..7fb975123 100644 --- a/citadel/modules/ctdlproto/serv_messages.c +++ b/citadel/modules/ctdlproto/serv_messages.c @@ -1,7 +1,7 @@ /* * represent messages to the citadel clients * - * Copyright (c) 1987-2017 by the citadel.org team + * Copyright (c) 1987-2018 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -63,7 +63,7 @@ void headers_listing(long msgnum, void *userdata) msgnum, (!CM_IsEmpty(msg, eTimestamp) ? msg->cm_fields[eTimestamp] : "0"), (!CM_IsEmpty(msg, eAuthor) ? msg->cm_fields[eAuthor] : ""), - (!CM_IsEmpty(msg, eNodeName) ? msg->cm_fields[eNodeName] : ""), + CtdlGetConfigStr("c_nodename"), // no more nodenames anymore (!CM_IsEmpty(msg, erFc822Addr) ? msg->cm_fields[erFc822Addr] : ""), (!CM_IsEmpty(msg, eMsgSubject) ? msg->cm_fields[eMsgSubject] : "") ); diff --git a/citadel/modules/instmsg/serv_instmsg.c b/citadel/modules/instmsg/serv_instmsg.c index b150a9167..5915ab6c7 100644 --- a/citadel/modules/instmsg/serv_instmsg.c +++ b/citadel/modules/instmsg/serv_instmsg.c @@ -1,7 +1,7 @@ /* * This module handles instant messaging between users. * - * Copyright (c) 1987-2015 by the citadel.org team + * Copyright (c) 1987-2018 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -479,7 +479,6 @@ void flush_individual_conversation(struct imlog *im) { } CM_SetField(msg, eOriginalRoom, HKEY(PAGELOGROOM)); - CM_SetField(msg, eNodeName, CtdlGetConfigStr("c_nodename"), strlen(CtdlGetConfigStr("c_nodename"))); CM_SetAsFieldSB(msg, eMesageText, &FullMsgBuf); /* we own this memory now */ /* Start with usernums[1] because it's guaranteed to be higher than usernums[0], diff --git a/citadel/modules/sieve/serv_sieve.c b/citadel/modules/sieve/serv_sieve.c index c948bc619..30f64baab 100644 --- a/citadel/modules/sieve/serv_sieve.c +++ b/citadel/modules/sieve/serv_sieve.c @@ -2,7 +2,7 @@ * This module glues libSieve to the Citadel server in order to implement * the Sieve mailbox filtering language (RFC 3028). * - * Copyright (c) 1987-2017 by the citadel.org team + * Copyright (c) 1987-2018 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -578,9 +578,6 @@ void sieve_do_msg(long msgnum, void *userdata) { if (!CM_IsEmpty(msg, erFc822Addr)) { safestrncpy(my.sender, msg->cm_fields[erFc822Addr], sizeof my.sender); } - else if ( (!CM_IsEmpty(msg, eAuthor)) && (!CM_IsEmpty(msg, eNodeName)) ) { - snprintf(my.sender, sizeof my.sender, "%s@%s", msg->cm_fields[eAuthor], msg->cm_fields[eNodeName]); - } else if (!CM_IsEmpty(msg, eAuthor)) { safestrncpy(my.sender, msg->cm_fields[eAuthor], sizeof my.sender); } diff --git a/citadel/modules/smtp/serv_smtp.c b/citadel/modules/smtp/serv_smtp.c index 62bbe941c..e22881fa5 100644 --- a/citadel/modules/smtp/serv_smtp.c +++ b/citadel/modules/smtp/serv_smtp.c @@ -898,7 +898,6 @@ void smtp_data(long offset, long flags) return; } - CM_SetField(msg, eNodeName, CtdlGetConfigStr("c_nodename"), strlen(CtdlGetConfigStr("c_nodename"))); CM_SetField(msg, eHumanNode, CtdlGetConfigStr("c_humannode"), strlen(CtdlGetConfigStr("c_humannode"))); CM_SetField(msg, eOriginalRoom, HKEY(MAILROOM)); if (sSMTP->preferred_sender_name != NULL) diff --git a/citadel/modules/smtp/smtp_util.c b/citadel/modules/smtp/smtp_util.c index 4a4ac365b..01b3bed35 100644 --- a/citadel/modules/smtp/smtp_util.c +++ b/citadel/modules/smtp/smtp_util.c @@ -1,7 +1,7 @@ /* * Utility functions for the Citadel SMTP implementation * - * Copyright (c) 1998-2017 by the citadel.org team + * Copyright (c) 1998-2018 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. @@ -120,7 +120,6 @@ void smtp_do_bounce(const char *instr, int is_final) bmsg->cm_format_type = FMT_RFC822; CM_SetField(bmsg, eAuthor, HKEY("Citadel")); CM_SetField(bmsg, eOriginalRoom, HKEY(MAILROOM)); - CM_SetField(bmsg, eNodeName, CtdlGetConfigStr("c_nodename"), strlen(CtdlGetConfigStr("c_nodename"))); CM_SetField(bmsg, eMsgSubject, HKEY("Delivery Status Notification (Failure)")); StrBufAppendBufPlain(BounceMB, HKEY("Content-type: multipart/mixed; boundary=\""), 0); StrBufAppendBuf(BounceMB, boundary, 0); diff --git a/citadel/modules/wiki/serv_wiki.c b/citadel/modules/wiki/serv_wiki.c index c415dd975..9851bf537 100644 --- a/citadel/modules/wiki/serv_wiki.c +++ b/citadel/modules/wiki/serv_wiki.c @@ -1,7 +1,7 @@ /* * Server-side module for Wiki rooms. This handles things like version control. * - * Copyright (c) 2009-2017 by the citadel.org team + * Copyright (c) 2009-2018 by the citadel.org team * * This program is open source software. You can redistribute it and/or * modify it under the terms of the GNU General Public License, version 3. @@ -667,8 +667,6 @@ void wiki_rev(char *pagename, char *rev, char *operation) CM_SetField(msg, eOriginalRoom, CCC->room.QRname, strlen(CCC->room.QRname)); } - CM_SetField(msg, eNodeName, CtdlGetConfigStr("c_nodename"), strlen(CtdlGetConfigStr("c_nodename"))); - if (!IsEmptyStr(pagename)) { CM_SetField(msg, eExclusiveID, pagename, strlen(pagename)); } diff --git a/citadel/msgbase.c b/citadel/msgbase.c index a4ef8b925..ec136d06c 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -2912,12 +2912,12 @@ long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */ /* Decide where bounces need to be delivered */ if ((recps != NULL) && (recps->bounce_to == NULL)) { - if (CC->logged_in) - snprintf(bounce_to, sizeof bounce_to, "%s@%s", - CC->user.fullname, CtdlGetConfigStr("c_nodename")); - else - snprintf(bounce_to, sizeof bounce_to, "%s@%s", - msg->cm_fields[eAuthor], msg->cm_fields[eNodeName]); + if (CC->logged_in) { + snprintf(bounce_to, sizeof bounce_to, "%s@%s", CC->user.fullname, CtdlGetConfigStr("c_nodename")); + } + else { + snprintf(bounce_to, sizeof bounce_to, "%s@%s", msg->cm_fields[eAuthor], msg->cm_fields[eNodeName]); + } recps->bounce_to = bounce_to; } -- 2.30.2