- remove useless re-run lock
- remember the room-number on the RSS-Aggregator struct; we need to know that so we can decrease the room count later
sizeof(rss_aggregator));
memset (RSSAggr, 0, sizeof(rss_aggregator));
sizeof(rss_aggregator));
memset (RSSAggr, 0, sizeof(rss_aggregator));
+ RSSAggr->QRnumber = qrbuf->QRnumber;
RSSAggr->roomlist_parts = 1;
RSSAggr->Url = NewStrBuf();
RSSAggr->roomlist_parts = 1;
RSSAggr->Url = NewStrBuf();
* Scan for rooms that have RSS client requests configured
*/
void rssclient_scan(void) {
* Scan for rooms that have RSS client requests configured
*/
void rssclient_scan(void) {
- static int doing_rssclient = 0;
rss_aggregator *rptr = NULL;
void *vrptr = NULL;
HashPos *it;
long len;
const char *Key;
rss_aggregator *rptr = NULL;
void *vrptr = NULL;
HashPos *it;
long len;
const char *Key;
+ time_t now = time(NULL);
/* Run no more than once every 15 minutes. */
/* Run no more than once every 15 minutes. */
- if ((time(NULL) - last_run) < 900) {
+ if ((now - last_run) < 900) {
* don't really require extremely fine granularity here, we'll do it
* with a static variable instead.
*/
* don't really require extremely fine granularity here, we'll do it
* with a static variable instead.
*/
- if (doing_rssclient) return;
- doing_rssclient = 1;
if ((GetCount(RSSQueueRooms) > 0) || (GetCount(RSSFetchUrls) > 0))
return;
if ((GetCount(RSSQueueRooms) > 0) || (GetCount(RSSFetchUrls) > 0))
return;
pthread_mutex_unlock(&RSSQueueMutex);
syslog(LOG_DEBUG, "rssclient ended\n");
pthread_mutex_unlock(&RSSQueueMutex);
syslog(LOG_DEBUG, "rssclient ended\n");