[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 06/153: Curl_getoff_all_pipelines: improved for mul
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 06/153: Curl_getoff_all_pipelines: improved for multiplexed |
Date: |
Tue, 11 Sep 2018 12:51:17 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 151d3c56dcadc6b04508bdcb85acf2f0f96e4aff
Author: Daniel Stenberg <address@hidden>
AuthorDate: Wed Jul 4 01:20:31 2018 +0200
Curl_getoff_all_pipelines: improved for multiplexed
On multiplexed connections, transfers can be removed from anywhere not
just at the head as for pipelines.
---
lib/url.c | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/lib/url.c b/lib/url.c
index b81174497..f5a5e9586 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -851,6 +851,7 @@ static int IsPipeliningPossible(const struct Curl_easy
*handle,
return avail;
}
+/* Returns non-zero if a handle was removed */
int Curl_removeHandleFromPipeline(struct Curl_easy *handle,
struct curl_llist *pipeline)
{
@@ -899,15 +900,24 @@ static struct Curl_easy* gethandleathead(struct
curl_llist *pipeline)
void Curl_getoff_all_pipelines(struct Curl_easy *data,
struct connectdata *conn)
{
- bool recv_head = (conn->readchannel_inuse &&
- Curl_recvpipe_head(data, conn));
- bool send_head = (conn->writechannel_inuse &&
- Curl_sendpipe_head(data, conn));
-
- if(Curl_removeHandleFromPipeline(data, &conn->recv_pipe) && recv_head)
- Curl_pipeline_leave_read(conn);
- if(Curl_removeHandleFromPipeline(data, &conn->send_pipe) && send_head)
- Curl_pipeline_leave_write(conn);
+ if(!conn->bundle)
+ return;
+ if(conn->bundle->multiuse == BUNDLE_PIPELINING) {
+ bool recv_head = (conn->readchannel_inuse &&
+ Curl_recvpipe_head(data, conn));
+ bool send_head = (conn->writechannel_inuse &&
+ Curl_sendpipe_head(data, conn));
+
+ if(Curl_removeHandleFromPipeline(data, &conn->recv_pipe) && recv_head)
+ Curl_pipeline_leave_read(conn);
+ if(Curl_removeHandleFromPipeline(data, &conn->send_pipe) && send_head)
+ Curl_pipeline_leave_write(conn);
+ }
+ else {
+ int rc;
+ rc = Curl_removeHandleFromPipeline(data, &conn->recv_pipe);
+ rc += Curl_removeHandleFromPipeline(data, &conn->send_pipe);
+ }
}
static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 31/153: docs/INSTALL.md: minor formatting fixes, (continued)
- [GNUnet-SVN] [gnurl] 31/153: docs/INSTALL.md: minor formatting fixes, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 18/153: smb_getsock: always wait for write socket too, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 17/153: test1143: disable MSYS2's POSIX path conversion, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 21/153: tests: fixes for Windows line endlings, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 22/153: vtls: set conn->data when closing TLS, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 11/153: content_encoding: accept up to 4 unknown trailer bytes after raw deflate data, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 07/153: multi: always do the COMPLETED procedure/state, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 09/153: schannel: enable CALG_TLS1PRF for w32api >= 5.1, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 15/153: CMake: Update scripts to use consistent style, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 03/153: openssl: assume engine support in 1.0.0 or later, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 06/153: Curl_getoff_all_pipelines: improved for multiplexed,
gnunet <=