* This module handles shared rooms, inter-Citadel mail, and outbound
* mailing list processing.
*
* This module handles shared rooms, inter-Citadel mail, and outbound
* mailing list processing.
*
*
* 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.
*
* 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.
* so many things inside these, here are the rules:
* 1. begin_critical_section(S_NETCONFIGS) *before* begin_ any others.
* 2. Do *not* perform any I/O with the client during these sections.
* so many things inside these, here are the rules:
* 1. begin_critical_section(S_NETCONFIGS) *before* begin_ any others.
* 2. Do *not* perform any I/O with the client during these sections.
- pCfgLine = pRNCFG->NetConfigs[ignet_push_share];
- while (pCfgLine != NULL)
+ /* Search for an ignet_oush_share configuration bearing the target node's name */
+ for (pCfgLine = pRNCFG->NetConfigs[ignet_push_share]; pCfgLine != NULL; pCfgLine = pCfgLine->next)
memset(&sc, 0, sizeof(SpoolControl));
memset(&OneRNCFG, 0, sizeof(OneRoomNetCfg));
sc.RNCfg = &OneRNCFG;
sc.RNCfg->NetConfigs[ignet_push_share] = DuplicateOneGenericCfgLine(pCfgLine);
memset(&sc, 0, sizeof(SpoolControl));
memset(&OneRNCFG, 0, sizeof(OneRoomNetCfg));
sc.RNCfg = &OneRNCFG;
sc.RNCfg->NetConfigs[ignet_push_share] = DuplicateOneGenericCfgLine(pCfgLine);
- sc.Users[ignet_push_share] = NewStrBufPlain(NULL,
- StrLength(pCfgLine->Value[0]) +
- StrLength(pCfgLine->Value[1]) + 10
- );
+ sc.Users[ignet_push_share] = NewStrBufPlain(NULL, (StrLength(pCfgLine->Value[0]) + StrLength(pCfgLine->Value[1]) + 10) );
StrBufAppendBuf(sc.Users[ignet_push_share], pCfgLine->Value[0], 0);
StrBufAppendBufPlain(sc.Users[ignet_push_share], HKEY(","), 0);
StrBufAppendBuf(sc.Users[ignet_push_share], pCfgLine->Value[1], 0);
CalcListID(&sc);
StrBufAppendBuf(sc.Users[ignet_push_share], pCfgLine->Value[0], 0);
StrBufAppendBufPlain(sc.Users[ignet_push_share], HKEY(","), 0);
StrBufAppendBuf(sc.Users[ignet_push_share], pCfgLine->Value[1], 0);
CalcListID(&sc);
num_spooled = CtdlForEachMessage(MSGS_ALL, 0L, NULL, NULL, NULL, network_spool_msg, &sc);
/* Concise cleanup because we know there's only one node in the sc */
num_spooled = CtdlForEachMessage(MSGS_ALL, 0L, NULL, NULL, NULL, network_spool_msg, &sc);
/* Concise cleanup because we know there's only one node in the sc */
DeleteHash(&sc.working_ignetcfg);
DeleteHash(&sc.the_netmap);
free_spoolcontrol_struct_members(&sc);
DeleteHash(&sc.working_ignetcfg);
DeleteHash(&sc.the_netmap);
free_spoolcontrol_struct_members(&sc);
- QN_syslog(LOG_NOTICE, "Synchronized %d messages to <%s>\n",
- num_spooled, target_node);
+ QN_syslog(LOG_NOTICE, "Synchronized %d messages to <%s>", num_spooled, target_node);
/* Load the IGnet Configuration into memory */
working_ignetcfg = CtdlLoadIgNetCfg();
/*
* Load the network map and filter list into memory.
*/
/* Load the IGnet Configuration into memory */
working_ignetcfg = CtdlLoadIgNetCfg();
/*
* Load the network map and filter list into memory.
*/
{
/* 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
{
/* 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
- extract_token(recipient, recps->recp_ignet, i,
- '|', rlen + 1);
+ extract_token(recipient, recps->recp_ignet, i, '|', rlen + 1);
rblen = extract_token(RBuf, recipient, 0, '@', rlen + 1);
dblen = extract_token(DBuf, recipient, 1, '@', rlen + 1);
rblen = extract_token(RBuf, recipient, 0, '@', rlen + 1);
dblen = extract_token(DBuf, recipient, 1, '@', rlen + 1);
if (network_fp != NULL) {
rv = fwrite(smr.ser, smr.len, 1, network_fp);
if (rv == -1) {
if (network_fp != NULL) {
rv = fwrite(smr.ser, smr.len, 1, network_fp);
if (rv == -1) {