toolbox

Check-in [96a9e17c2e]
Login

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

Overview
Comment:rss: feeds_refresh() reduce db usage
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:96a9e17c2ed04379ee5f75a9d01b083ff4b241033b0d0f51c0d60113a3645440
User & Date: jef 2019-03-23 11:38:39
Context
2019-04-01
20:14
radio: remove duplicate radios check-in: 750ac9bfab user: jef tags: trunk
2019-03-23
11:38
rss: feeds_refresh() reduce db usage check-in: 96a9e17c2e user: jef tags: trunk
2019-02-25
09:04
lib: use explicit error code check-in: 59aa81acb3 user: jef tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/lib/die.c.

1
2
3
4
5
6
7
8
9
10
11
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <err.h>
#include "die.h"

void
warning(const char *fmt, ...)
{
	char *fmt2;



<







1
2
3

4
5
6
7
8
9
10
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>

#include <err.h>
#include "die.h"

void
warning(const char *fmt, ...)
{
	char *fmt2;

Changes to src/rss/feeds.c.

250
251
252
253
254
255
256
257
258
259
260

261
262
263
264
265
266
267
		}
		pid = fork();
		switch (pid) {
		case -1:
			die("fork error:");
			return;
		case 0:
			db_open();
			feed = feed_parse(feedlink->url);
			if (feed == NULL)
				exit(1);

			feed_refresh(feed);
			db_close();
			exit(0);
			break;
		default:
			nrunning++;
			break;







<



>







250
251
252
253
254
255
256

257
258
259
260
261
262
263
264
265
266
267
		}
		pid = fork();
		switch (pid) {
		case -1:
			die("fork error:");
			return;
		case 0:

			feed = feed_parse(feedlink->url);
			if (feed == NULL)
				exit(1);
			db_open();
			feed_refresh(feed);
			db_close();
			exit(0);
			break;
		default:
			nrunning++;
			break;