[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 11/178: pause: when changing pause state, update so
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 11/178: pause: when changing pause state, update socket state |
Date: |
Wed, 23 May 2018 12:24:06 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 2404aa080e1cc62634b44091f58737d2c618e361
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Mar 16 12:03:52 2018 +0100
pause: when changing pause state, update socket state
Especially unpausing a transfer might have to move the socket back to the
"currently used sockets" hash to get monitored. Otherwise it would never get
any more data and get stuck. Easily triggered with pausing using the
multi_socket API.
Reported-by: Philip Prindeville
Bug: https://curl.haxx.se/mail/lib-2018-03/0048.html
Fixes #2393
Closes #2391
---
lib/easy.c | 4 ++++
lib/multi.c | 6 ++++++
lib/multiif.h | 3 ++-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/lib/easy.c b/lib/easy.c
index 64c647be2..fa34c3827 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -1099,6 +1099,10 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int
action)
(KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) )
Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */
+ /* This transfer may have been moved in or out of the bundle, update
+ the corresponding socket callback, if used */
+ Curl_updatesocket(data);
+
return result;
}
diff --git a/lib/multi.c b/lib/multi.c
index 69df90288..2f139ab37 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -2421,6 +2421,12 @@ static void singlesocket(struct Curl_multi *multi,
data->numsocks = num;
}
+void Curl_updatesocket(struct Curl_easy *data)
+{
+ singlesocket(data->multi, data);
+}
+
+
/*
* Curl_multi_closed()
*
diff --git a/lib/multiif.h b/lib/multiif.h
index a988bfd4a..b9c722aed 100644
--- a/lib/multiif.h
+++ b/lib/multiif.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -26,6 +26,7 @@
* Prototypes for library-wide functions provided by multi.c
*/
+void Curl_updatesocket(struct Curl_easy *data);
void Curl_expire(struct Curl_easy *data, time_t milli, expire_id);
void Curl_expire_clear(struct Curl_easy *data);
void Curl_expire_done(struct Curl_easy *data, expire_id id);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 07/178: RELEASE-NOTES: toward 7.60.0, (continued)
- [GNUnet-SVN] [gnurl] 07/178: RELEASE-NOTES: toward 7.60.0, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 02/178: SECURITY-PROCESS: mention how we write/add advisories, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 04/178: transfer: make HTTP without headers count correct body size, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 03/178: test1208: marked flaky, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 19/178: cmake: add support for brotli, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 16/178: resolve: add CURLOPT_DNS_SHUFFLE_ADDRESSES, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 09/178: rate-limit: use three second window to better handle high speeds, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 27/178: cookie.d: mention that "-" as filename means stdin, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 18/178: darwinssl: fix iOS build, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 21/178: parsedate: support UT timezone, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 11/178: pause: when changing pause state, update socket state,
gnunet <=
- [GNUnet-SVN] [gnurl] 13/178: curl_version_info.3: fix ssl_version description, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 31/178: http2: read pending frames (including GOAWAY) in connection-check, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 15/178: add_handle/easy_perform: clear errorbuffer on start if set, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 28/178: TODO: expand ~/ in config files, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 32/178: timeval: remove compilation warning by casting (#2417), gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 23/178: vauth/ntlm.h: fix the #ifdef header guard, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 08/178: cleanup: misc typos in strings and comments, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 29/178: CURLINFO_SSL_VERIFYRESULT.3: fix the example, add some text, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 38/178: runtests.pl: fix warning 'use of uninitialized value', gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 24/178: lib/curl_path.h: add #ifdef header guard, gnunet, 2018/05/23