[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/maint-0.2.7] If we start/stop reading on a dnsserv connection, don't assert.
commit e79da62645925f3286deb21740bbe91de9dafacc
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Fri Mar 11 10:33:19 2016 -0500
If we start/stop reading on a dnsserv connection, don't assert.
Fixes bug 16248. Patch from cypherpunks. Bugfix on 0.2.0.1-alpha.
---
src/or/main.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/or/main.c b/src/or/main.c
index 534a6ac..3fb80e1 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -578,6 +578,12 @@ connection_stop_reading,(connection_t *conn))
return;
});
+ /* if dummy conn then no socket and no event, nothing to do here */
+ if (conn->type == CONN_TYPE_AP && TO_EDGE_CONN(conn)->is_dns_request) {
+ tor_assert(!conn->read_event);
+ return;
+ }
+
tor_assert(conn->read_event);
if (conn->linked) {
@@ -603,6 +609,12 @@ connection_start_reading,(connection_t *conn))
return;
});
+ /* if dummy conn then no socket and no event, nothing to do here */
+ if (conn->type == CONN_TYPE_AP && TO_EDGE_CONN(conn)->is_dns_request) {
+ tor_assert(!conn->read_event);
+ return;
+ }
+
tor_assert(conn->read_event);
if (conn->linked) {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits