$Log$
+ Revision 610.4 2003/08/29 08:21:57 ajc
+ * Do network runs more proactively. The inbound queue is now scanned
+ every minute instead of every poll frequency.
+
Revision 610.3 2003/08/21 23:26:06 ajc
* setup.c: offer to disable "exim" if found
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
void network_do_queue(void) {
static time_t last_run = 0L;
struct RoomProcList *ptr;
+ int full_processing = 1;
/*
- * Run no more frequently than once every n seconds
+ * Run the full set of processing tasks no more frequently
+ * than once every n seconds
*/
- if ( (time(NULL) - last_run) < config.c_net_freq ) return;
+ if ( (time(NULL) - last_run) < config.c_net_freq ) {
+ full_processing = 0;
+ }
/*
* This is a simple concurrency check to make sure only one queue run
/*
* Poll other Citadel nodes.
*/
- network_poll_other_citadel_nodes();
+ if (full_processing) {
+ network_poll_other_citadel_nodes();
+ }
/*
* Load the network map and filter list into memory.
/*
* Go ahead and run the queue
*/
- lprintf(7, "network: loading outbound queue\n");
- ForEachRoom(network_queue_room, NULL);
-
- lprintf(7, "network: running outbound queue\n");
- while (rplist != NULL) {
- network_spoolout_room(rplist->name);
- ptr = rplist;
- rplist = rplist->next;
- phree(ptr);
+ if (full_processing) {
+ lprintf(7, "network: loading outbound queue\n");
+ ForEachRoom(network_queue_room, NULL);
+
+ lprintf(7, "network: running outbound queue\n");
+ while (rplist != NULL) {
+ network_spoolout_room(rplist->name);
+ ptr = rplist;
+ rplist = rplist->next;
+ phree(ptr);
+ }
}
lprintf(7, "network: processing inbound queue\n");