toolbox

Check-in [7b0b676be1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:rss: remove unnecessary variable
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7b0b676be12785944e3b4317fb8ad7361ae72a47a4839875c7dd3ed71f99ef8d
User & Date: jef 2019-08-04 13:02:19
Context
2019-08-04
13:03
radio: add Vertical Radio check-in: bf1de8151f user: jef tags: trunk
13:02
rss: remove unnecessary variable check-in: 7b0b676be1 user: jef tags: trunk
2019-05-14
07:11
rss: cleanup libmrss Makefile check-in: 1a8afe23ee user: jef tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/rss/feeds.c.

243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267

void
feeds_refresh()
{
	struct feedlinks *feedlinks;
	struct feedlink *feedlink;
	struct feed *feed;
	pid_t pid;
	size_t nrunning = 0, nthreads = 20;

	feedlinks = feeds_get_feedlinks();
	TAILQ_FOREACH(feedlink, feedlinks, next) {
		if (nrunning == nthreads) {
			waitpid(-1, NULL, 0);
			nrunning--;
		}
		pid = fork();
		switch (pid) {
		case -1:
			die("fork error:");
			return;
		case 0:
			feed = feed_parse(feedlink->url);
			if (feed == NULL)
				exit(1);







<








<
|







243
244
245
246
247
248
249

250
251
252
253
254
255
256
257

258
259
260
261
262
263
264
265

void
feeds_refresh()
{
	struct feedlinks *feedlinks;
	struct feedlink *feedlink;
	struct feed *feed;

	size_t nrunning = 0, nthreads = 20;

	feedlinks = feeds_get_feedlinks();
	TAILQ_FOREACH(feedlink, feedlinks, next) {
		if (nrunning == nthreads) {
			waitpid(-1, NULL, 0);
			nrunning--;
		}

		switch (fork()) {
		case -1:
			die("fork error:");
			return;
		case 0:
			feed = feed_parse(feedlink->url);
			if (feed == NULL)
				exit(1);