summaryrefslogtreecommitdiffstats
path: root/abs/core/curl/0001-singlesocket-fix-the-sincebefore-placement.patch
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/curl/0001-singlesocket-fix-the-sincebefore-placement.patch')
-rw-r--r--abs/core/curl/0001-singlesocket-fix-the-sincebefore-placement.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/abs/core/curl/0001-singlesocket-fix-the-sincebefore-placement.patch b/abs/core/curl/0001-singlesocket-fix-the-sincebefore-placement.patch
new file mode 100644
index 0000000..ecbed62
--- /dev/null
+++ b/abs/core/curl/0001-singlesocket-fix-the-sincebefore-placement.patch
@@ -0,0 +1,52 @@
+From b7753be57d7bdb6b909f1a0a4207950e18100d79 Mon Sep 17 00:00:00 2001
+Message-Id: <b7753be57d7bdb6b909f1a0a4207950e18100d79.1550588688.git.jan.steffens@gmail.com>
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Tue, 19 Feb 2019 15:56:54 +0100
+Subject: [PATCH] singlesocket: fix the 'sincebefore' placement
+
+The variable wasn't properly reset within the loop and thus could remain
+set for sockets that hadn't been set before and thus missed notifying
+the app.
+
+Detected-by: Jan Alexander Steffens
+Fixes #3585
+---
+ lib/multi.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/multi.c b/lib/multi.c
+index aaae8b978..521262b2b 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -2349,26 +2349,26 @@ static CURLMcode singlesocket(struct Curl_multi *multi,
+ int num;
+ unsigned int curraction;
+ int actions[MAX_SOCKSPEREASYHANDLE];
+- unsigned int comboaction;
+- bool sincebefore = FALSE;
+
+ for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++)
+ socks[i] = CURL_SOCKET_BAD;
+
+ /* Fill in the 'current' struct with the state as it is now: what sockets to
+ supervise and for what actions */
+ curraction = multi_getsock(data, socks, MAX_SOCKSPEREASYHANDLE);
+
+ /* We have 0 .. N sockets already and we get to know about the 0 .. M
+ sockets we should have from now on. Detect the differences, remove no
+ longer supervised ones and add new ones */
+
+ /* walk over the sockets we got right now */
+ for(i = 0; (i< MAX_SOCKSPEREASYHANDLE) &&
+ (curraction & (GETSOCK_READSOCK(i) | GETSOCK_WRITESOCK(i)));
+ i++) {
+ unsigned int action = CURL_POLL_NONE;
+ unsigned int prevaction = 0;
++ unsigned int comboaction;
++ bool sincebefore = FALSE;
+
+ s = socks[i];
+
+--
+2.20.1
+