currently the RSS-Thread is run over and over; we shouldn't stress our partrers to much, so we let the network poll frequency elaps before we try to poll the rss feed again.
char *rooms;
time_t last_error_when;
int ItemType;
+ time_t next_poll;
};
#define RSS_UNSET (1<<0)
const char *at;
long len;
+ time_t now;
+
+ now = time(NULL);
+
+ if ((Cfg->next_poll != 0) && (now < Cfg->next_poll))
+ return;
memset(&ri, 0, sizeof(rss_item));
rssc.Item = &ri;
rssc.Cfg = Cfg;
flush_rss_item(&ri);
FreeStrBuf(&rssc.CData);
FreeStrBuf(&rssc.Key);
+
+ Cfg->next_poll = time(NULL) + config.c_net_freq;
}
/* Otherwise create a new client request */
if (use_this_rncptr == NULL) {
rncptr = (rssnetcfg *) malloc(sizeof(rssnetcfg));
+ memset(rncptr, 0, sizeof(rssnetcfg));
rncptr->ItemType = RSS_UNSET;
if (rncptr != NULL) {
rncptr->next = rnclist;