ups, more places to reset the time we ran last time.
authorWilfried Goesgens <dothebart@citadel.org>
Tue, 18 Oct 2011 19:35:16 +0000 (21:35 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 18 Oct 2011 19:35:16 +0000 (21:35 +0200)
citadel/modules/rssclient/serv_rssclient.c

index 561da6d96f9fc2b7bcc06bc7d38273983d499cf4..b8d1b4495ec9cdd260d13ff61b0caf50094f09e6 100644 (file)
@@ -62,6 +62,8 @@
 #define TMP_SHORTER_URL_OFFSET 0xFE
 #define TMP_SHORTER_URLS 0xFD
 
+time_t last_run = 0L;
+
 pthread_mutex_t RSSQueueMutex; /* locks the access to the following vars: */
 HashList *RSSQueueRooms = NULL; /* rss_room_counter */
 HashList *RSSFetchUrls = NULL; /* -> rss_aggregator; ->RefCount access to be locked too. */
@@ -140,7 +142,7 @@ void UnlinkRooms(rss_aggregator *Cfg)
                }
 /*
                if (server_shutting_down)
-                       break; /* TODO */
+                       break; / * TODO */
 
                DeleteHashPos(&At);
        }
@@ -158,6 +160,7 @@ void UnlinkRSSAggregator(rss_aggregator *Cfg)
                DeleteEntryFromHash(RSSFetchUrls, At);
        }
        DeleteHashPos(&At);
+       last_run = time(NULL);
 }
 
 eNextState FreeNetworkSaveMessage (AsyncIO *IO)
@@ -179,6 +182,7 @@ eNextState FreeNetworkSaveMessage (AsyncIO *IO)
        FreeStrBuf(&Ctx->Message);
        FreeStrBuf(&Ctx->MsgGUID);
        free(Ctx);
+       last_run = time(NULL);
        return eAbort;
 }