[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 148/178: transfer: don't unset writesockfd on setup
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 148/178: transfer: don't unset writesockfd on setup of multiplexed conns |
Date: |
Wed, 23 May 2018 12:26:23 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit f8d608f38d00a129680f5535ed2f1e60fc226d30
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri May 4 16:41:03 2018 +0200
transfer: don't unset writesockfd on setup of multiplexed conns
Curl_setup_transfer() can be called to setup a new individual transfer
over a multiplexed connection so it shouldn't unset writesockfd.
Bug: #2520
Closes #2549
---
lib/transfer.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/lib/transfer.c b/lib/transfer.c
index 5c8eb31d3..6bf95c576 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -2018,11 +2018,18 @@ Curl_setup_transfer(
DEBUGASSERT((sockindex <= 1) && (sockindex >= -1));
- /* now copy all input parameters */
- conn->sockfd = sockindex == -1 ?
+ if(conn->bits.multiplex || conn->httpversion == 20) {
+ /* when multiplexing, the read/write sockets need to be the same! */
+ conn->sockfd = sockindex == -1 ?
+ conn->sock[writesockindex] : conn->sock[sockindex];
+ conn->writesockfd = conn->sockfd;
+ }
+ else {
+ conn->sockfd = sockindex == -1 ?
CURL_SOCKET_BAD : conn->sock[sockindex];
- conn->writesockfd = writesockindex == -1 ?
+ conn->writesockfd = writesockindex == -1 ?
CURL_SOCKET_BAD:conn->sock[writesockindex];
+ }
k->getheader = getheader;
k->size = size;
@@ -2041,10 +2048,10 @@ Curl_setup_transfer(
/* we want header and/or body, if neither then don't do this! */
if(k->getheader || !data->set.opt_no_body) {
- if(conn->sockfd != CURL_SOCKET_BAD)
+ if(sockindex != -1)
k->keepon |= KEEP_RECV;
- if(conn->writesockfd != CURL_SOCKET_BAD) {
+ if(writesockindex != -1) {
struct HTTP *http = data->req.protop;
/* HTTP 1.1 magic:
@@ -2075,7 +2082,7 @@ Curl_setup_transfer(
/* enable the write bit when we're not waiting for continue */
k->keepon |= KEEP_SEND;
}
- } /* if(conn->writesockfd != CURL_SOCKET_BAD) */
+ } /* if(writesockindex != -1) */
} /* if(k->getheader || !data->set.opt_no_body) */
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 95/178: openssl: fix subjectAltName check on non-ASCII platforms, (continued)
- [GNUnet-SVN] [gnurl] 95/178: openssl: fix subjectAltName check on non-ASCII platforms, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 117/178: cookies: ensure that we have cookies before writing jar, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 106/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 98/178: http2: handle GOAWAY properly, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 122/178: http2: get rid of another strstr(), gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 125/178: cookies: remove unused macro, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 94/178: openssl: Add support for OpenSSL 1.1.1 verbose-mode trace messages, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 128/178: TODO: CLOEXEC, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 118/178: os400.c: fix ASSIGNWITHINCONDITION checksrc warnings, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 137/178: TODO: remove configure --disable-pthreads, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 148/178: transfer: don't unset writesockfd on setup of multiplexed conns,
gnunet <=
- [GNUnet-SVN] [gnurl] 151/178: github/lock: auto-lock closed issues after 90 days of inactivity, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 154/178: RELEASE-NOTES: typo, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 144/178: configure: only check for CA bundle for file-using SSL backends, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 147/178: configure: put CURLDEBUG and DEBUGBUILD in lib/curl_config.h, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 143/178: ssh-libssh.c: fix left shift compiler warning, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 149/178: vtls: use unified "supports" bitfield member in backends, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 159/178: smb: reject negative file sizes, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 177/178: RELEASE-NOTES: 7.60.0 release, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 155/178: travis: add a build using WolfSSL, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 146/178: http: don't set the "rewind" flag when not uploading anything, gnunet, 2018/05/23