summaryrefslogtreecommitdiff
path: root/debian/patches/06_509015_better_delays.patch
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2012-02-28 13:40:47 -0500
committerAndrew Shadura <andrew@shadura.me>2016-06-21 12:44:43 +0200
commitafd7cade2009ea4e90e4aaec80a266ce8e05197e (patch)
treee28127714afa4507485697bf2bcd3ec0a474e468 /debian/patches/06_509015_better_delays.patch
parent8b3c90e3ff12464a9e2263a1aa87dd45aa9a9a6a (diff)
Update to packaging format 3.0
The dpatch patch management system has been deprecated for some time. The Lintian currently flags use of dpatch packages as an error. The new 3.0 packaging format is an improved version which, among other things, contains patch management built-in. Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
Diffstat (limited to 'debian/patches/06_509015_better_delays.patch')
-rw-r--r--debian/patches/06_509015_better_delays.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/patches/06_509015_better_delays.patch b/debian/patches/06_509015_better_delays.patch
new file mode 100644
index 0000000..939ebf6
--- /dev/null
+++ b/debian/patches/06_509015_better_delays.patch
@@ -0,0 +1,30 @@
+From: Michel Lespinasse <walken@zoy.org>
+Subject: Don't wait for more than specified delays, fix for #509015
+
+diff -urNad ifplugd-0.28~/src/ifplugd.c ifplugd-0.28/src/ifplugd.c
+--- ifplugd-0.28~/src/ifplugd.c 2008-09-30 17:48:51.000000000 +0530
++++ ifplugd-0.28/src/ifplugd.c 2009-03-02 12:05:11.000000000 +0530
+@@ -468,6 +468,14 @@
+ tv.tv_sec = polltime;
+ tv.tv_usec = 0;
+
++ if (t) {
++ int delay = t - time(NULL);
++ if (delay < 0)
++ tv.tv_sec = 0;
++ else if (delay < tv.tv_sec)
++ tv.tv_sec = delay;
++ }
++
+ if (select(FD_SETSIZE, &qfds, NULL, NULL, &tv) < 0) {
+ if (errno == EINTR)
+ continue;
+@@ -573,7 +581,7 @@
+ }
+ }
+
+- if (t && t < time(NULL)) {
++ if (t && t <= time(NULL)) {
+ t = 0;
+
+ if (action(status) < 0)