* This module handles shared rooms, inter-Citadel mail, and outbound
* mailing list processing.
*
- * Copyright (c) 2000-2012 by the citadel.org team
+ * Copyright (c) 2000-2015 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.
+ * 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 distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* ** NOTE ** A word on the S_NETCONFIGS semaphore:
* This is a fairly high-level type of critical section. It ensures that no
typedef struct __roomlists {
RoomProcList *rplist;
-}roomlists;
+} roomlists;
+
+
/*
* When we do network processing, it's accomplished in two passes; one to
* gather a list of rooms and one to actually do them. It's ok that rplist
/* Grab the configuration line we're looking for */
begin_critical_section(S_NETCONFIGS);
pRNCFG = CtdlGetNetCfgForRoom(CCC->room.QRnumber);
- if ((pRNCFG == NULL) ||
- (pRNCFG->NetConfigs[ignet_push_share] == NULL))
+ if ((pRNCFG == NULL) || (pRNCFG->NetConfigs[ignet_push_share] == NULL))
{
return -1;
}
sc.RNCfg->NetConfigs[ignet_push_share] = DuplicateOneGenericCfgLine(pCfgLine);
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);
+ 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);
end_critical_section(S_NETCONFIGS);
sc.the_netmap = CtdlReadNetworkMap();
/* Send ALL messages */
- num_spooled = CtdlForEachMessage(MSGS_ALL, 0L, NULL, NULL, NULL,
- network_spool_msg, &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 */
DeleteGenericCfgLine(NULL/*TODO*/, &sc.RNCfg->NetConfigs[ignet_push_share]);
* Run the full set of processing tasks no more frequently
* than once every n seconds
*/
- if ( (time(NULL) - last_run) < config.c_net_freq ) {
+ if ( (time(NULL) - last_run) < CtdlGetConfigLong("c_net_freq") )
+ {
full_processing = 0;
syslog(LOG_DEBUG, "Network full processing in %ld seconds.\n",
- config.c_net_freq - (time(NULL)- last_run)
+ CtdlGetConfigLong("c_net_freq") - (time(NULL)- last_run)
);
}
last_run = time(NULL);
}
destroy_network_queue_room(RL.rplist);
- SaveChangedConfigs();
+ // SaveChangedConfigs(); // FIXME FOOFOO SAVE CHANGED THIS AACACACACCKK
}