]> code.citadel.org Git - citadel.git/commitdiff
* Do network runs more proactively. The inbound queue is now scanned
authorArt Cancro <ajc@citadel.org>
Fri, 29 Aug 2003 08:21:57 +0000 (08:21 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 29 Aug 2003 08:21:57 +0000 (08:21 +0000)
  every minute instead of every poll frequency.

citadel/ChangeLog
citadel/serv_network.c

index fc280c9f4b4f8e08bd2eec982b3ecf8237ef78d8..6a3298b444ad20f833ffad00fbfedbcce0a24ddf 100644 (file)
@@ -1,4 +1,8 @@
  $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
 
@@ -4979,4 +4983,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 3088de2debfa478e8d89535cecee6fbe18c50753..4d9ed6bdcde0b64765d55b57a953440488198c54 100644 (file)
@@ -1463,11 +1463,15 @@ void network_poll_other_citadel_nodes(void) {
 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
@@ -1482,7 +1486,9 @@ void network_do_queue(void) {
        /*
         * 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.
@@ -1493,15 +1499,17 @@ void network_do_queue(void) {
        /* 
         * 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");