* This module handles shared rooms, inter-Citadel mail, and outbound
* mailing list processing.
*
- * Copyright (c) 2000-2011 by the citadel.org team
+ * Copyright (c) 2000-2012 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 as published by
/*
* Deliver list messages to everyone on the list ... efficiently
*/
-void network_deliver_list(struct CtdlMessage *msg, SpoolControl *sc) {
+void network_deliver_list(struct CtdlMessage *msg, SpoolControl *sc, const char *RoomName) {
char *recps = NULL;
size_t recps_len = SIZ;
struct recptypes *valid;
if (valid != NULL) {
valid->bounce_to = strdup(bounce_to);
valid->envelope_from = strdup(bounce_to);
+ valid->sending_room = strdup(RoomName);
CtdlSubmitMsg(msg, valid, NULL, 0);
free_recipients(valid);
}
void network_spool_msg(long msgnum,
void *userdata)
{
+ StrBuf *Buf = NULL;
SpoolControl *sc;
int i;
char *newpath = NULL;
}
/* Handle delivery */
- network_deliver_list(msg, sc);
+ network_deliver_list(msg, sc, CC->room.QRname);
CtdlFreeMessage(msg);
}
}
config.c_nodename)) {
ok_to_participate = 1;
}
+
+ Buf = NewStrBufPlain(msg->cm_fields['N'], -1);
if (is_valid_node(NULL,
NULL,
- msg->cm_fields['N'],
+ Buf,
sc->working_ignetcfg,
sc->the_netmap) == 0)
{
mptr = mptr->next) {
send = 1;
-
+ if (Buf == NULL)
+ Buf = NewStrBufPlain(mptr->remote_nodename, -1);
+ else
+ StrBufPlain(Buf, mptr->remote_nodename, -1);
/* Check for valid node name */
if (is_valid_node(NULL,
NULL,
- mptr->remote_nodename,
+ Buf,
sc->working_ignetcfg,
sc->the_netmap) != 0)
{
if (delete_after_send) {
CtdlDeleteMessages(CC->room.QRname, &msgnum, 1, "");
}
-
+ FreeStrBuf(&Buf);
}