M Makefile => Makefile +1 -1
@@ 7,7 7,7 @@ common := $(CC) src/nfmd.c -fuse-ld=gold -std=gnu2x -lcurl -lmrss -Wall -Werror
all: nfmd docs
nfmd: $(srcs)
- $(common) nfmd -g -O3 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
+ $(common) nfmd -O3 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables
strip --strip-unneeded --remove-section=.comment --remove-section=.note nfmd
debug: $(srcs)
$(common) nfmd-debug -g3
M debian/control => debian/control +2 -0
@@ 11,6 11,8 @@ Package: nfmd
Architecture: any
Multi-Arch: foreign
Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: cron
+
Description: Daemon that grabs feeds specified in
a config file and sends them to specified email once
a day. Feeds can be RSS, Atom, or you can specify
M src/nfmd.c => src/nfmd.c +2 -0
@@ 18,6 18,7 @@
#define CURL_BUFFER_SIZE 1048576L
#define EMAIL_BUF_SIZE 256
#define SCHEMES_BUF_SIZE 128
+#define CURL_CONNECT_TIMEOUT_SEC 10
static const char *CONFIG_OPEN_ERR = "error opening config file";
static const char *ALLOC = "error allocating memory";
@@ 161,6 162,7 @@ static CURL *init_curl_handle(void) {
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, (long)CURL_HTTP_VERSION_2TLS);
curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite_unlocked);
+ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, CURL_CONNECT_TIMEOUT_SEC);
if (verbose) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
return curl;
}