[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 22/153: vtls: set conn->data when closing TLS
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 22/153: vtls: set conn->data when closing TLS |
Date: |
Tue, 11 Sep 2018 12:51:33 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 81377cace6a047308008d36740042231d6c7d122
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Jul 20 23:24:47 2018 +0200
vtls: set conn->data when closing TLS
Follow-up to 1b76c38904f0. The VTLS backends that close down the TLS
layer for a connection still needs a Curl_easy handle for the session_id
cache etc.
Fixes #2764
Closes #2771
---
lib/conncache.c | 1 -
lib/url.c | 4 ++++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/conncache.c b/lib/conncache.c
index 957ced3c7..6fbf3b1d2 100644
--- a/lib/conncache.c
+++ b/lib/conncache.c
@@ -314,7 +314,6 @@ void Curl_conncache_remove_conn(struct connectdata *conn,
bool lock)
if(lock) {
CONN_LOCK(data);
}
- conn->data = NULL; /* detach */
bundle_remove_conn(bundle, conn);
if(bundle->num_connections == 0)
conncache_remove_bundle(connc, bundle);
diff --git a/lib/url.c b/lib/url.c
index 48d697b3c..5f520e91e 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -788,6 +788,9 @@ CURLcode Curl_disconnect(struct Curl_easy *data,
free_fixed_hostname(&conn->http_proxy.host);
free_fixed_hostname(&conn->socks_proxy.host);
+ DEBUGASSERT(conn->data == data);
+ /* this assumes that the pointer is still there after the connection was
+ detected from the cache */
Curl_ssl_close(conn, FIRSTSOCKET);
conn_free(conn);
@@ -969,6 +972,7 @@ static bool extract_if_dead(struct connectdata *conn,
if(dead) {
infof(data, "Connection %ld seems to be dead!\n", conn->connection_id);
Curl_conncache_remove_conn(conn, FALSE);
+ conn->data = NULL; /* detach */
return TRUE;
}
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 04/153: conn: remove the boolean 'inuse' field, (continued)
- [GNUnet-SVN] [gnurl] 04/153: conn: remove the boolean 'inuse' field, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 20/153: test214: disable MSYS2's POSIX path conversion for URL, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 12/153: test1422: add required file feature, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 10/153: smb: fix memory-leak in URL parse error path, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 32/153: docs/examples: add hiperfifo example using linux epoll/timerfd, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 30/153: docs/CURLOPT_URL: fix indentation, gnunet, 2018/09/11
- [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 <=
- [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, 2018/09/11