closer...
[citadel.git] / citadel / modules / rssclient / serv_rssclient.c
index 17b67317fd7a5ac42c25e3e888ec954ab1acb73c..2fa5134e9173dd9a73f29ab1f561dae10a8e61e6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Bring external RSS feeds into rooms.
  *
- * Copyright (c) 2007-2015 by the citadel.org team
+ * Copyright (c) 2007-2016 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.
@@ -507,9 +507,9 @@ eNextState RSS_FetchNetworkUsetableEntry(AsyncIO *IO)
 
 void UpdateLastKnownGood(pRSSConfig *pCfg, time_t now)
 {
-       OneRoomNetCfgpRNCfg;
+       OneRoomNetCfg *pRNCfg;
        begin_critical_section(S_NETCONFIGS);
-       pRNCfg = CtdlGetNetCfgForRoom (pCfg->QRnumber);
+       pRNCfg = CtdlGetNetCfgForRoom(pCfg->QRnumber);
        if (pRNCfg != NULL)
        {
                RSSCfgLine *RSSCfg = (RSSCfgLine *)pRNCfg->NetConfigs[rssclient];
@@ -523,11 +523,11 @@ void UpdateLastKnownGood(pRSSConfig *pCfg, time_t now)
                }
                if (RSSCfg != NULL)
                {
-                       pRNCfg->changed = 1;
                        RSSCfg->last_known_good = now;
                }
        }
-
+       SaveRoomNetConfigFile(pRNCfg, pCfg->QRnumber);
+       FreeRoomNetworkStruct(&pRNCfg);
        end_critical_section(S_NETCONFIGS);
 }
 
@@ -770,6 +770,8 @@ void rssclient_scan_room(struct ctdlroom *qrbuf, void *data, OneRoomNetCfg *OneR
        rss_aggregator *use_this_RSSAggr = NULL;
        void *vptr;
 
+       TRACE;
+
        pthread_mutex_lock(&RSSQueueMutex);
        if (GetHash(RSSQueueRooms, LKEY(qrbuf->QRnumber), &vptr))
        {