transmission: Update to latest git and fix syslog.

The init script runs transmission with the foreground parameter for procd to control it. However, if transmission is ran in the foreground, nothing is logged to syslog. Added a patch to remove this restriction.

Also added a sysctl file that removes these warnings:

UDP Failed to set receive buffer: requested 4194304, got 262142 (tr-udp.c:75)
UDP Please add the line "net.core.rmem_max = 4194304" to /etc/sysctl.conf (tr-udp.c:80)
UDP Failed to set send buffer: requested 1048576, got 262142 (tr-udp.c:86)
UDP Please add the line "net.core.wmem_max = 1048576" to /etc/sysctl.conf (tr-udp.c:91)

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2017-11-21 18:02:40 -08:00
parent 5d216df6cd
commit c11bb018e5
4 changed files with 38 additions and 34 deletions
@@ -1,30 +0,0 @@
--- a/libtransmission/bitfield.c
+++ b/libtransmission/bitfield.c
@@ -6,6 +6,8 @@
*
*/
+#define __NEED_ssize_t
+
#include <assert.h>
#include <string.h> /* memset */
@@ -13,6 +15,7 @@
#include "bitfield.h"
#include "utils.h" /* tr_new0 () */
+
const tr_bitfield TR_BITFIELD_INIT = { NULL, 0, 0, 0, false, false };
/****
--- a/libtransmission/fdlimit.h
+++ b/libtransmission/fdlimit.h
@@ -10,6 +10,8 @@
#error only libtransmission should #include this header.
#endif
+#define __NEED_off_t
+
#include "transmission.h"
#include "file.h"
#include "net.h"
@@ -0,0 +1,30 @@
diff --git a/daemon/daemon.c b/daemon/daemon.c
index 7b2a3b425..5b19d105a 100644
--- a/daemon/daemon.c
+++ b/daemon/daemon.c
@@ -715,12 +715,7 @@ static int daemon_start(void* raw_arg, bool foreground)
}
#ifdef HAVE_SYSLOG
-
- if (!foreground)
- {
- openlog(MY_NAME, LOG_CONS | LOG_PID, LOG_DAEMON);
- }
-
+ openlog(MY_NAME, LOG_CONS | LOG_PID, LOG_DAEMON);
#endif
/* Create new timer event to report daemon status */
@@ -772,11 +767,8 @@ cleanup:
/* shutdown */
#ifdef HAVE_SYSLOG
- if (!foreground)
- {
syslog(LOG_INFO, "%s", "Closing session");
closelog();
- }
#endif