mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix a couple of bufferevent incompatibilities that snuck in.
This commit is contained in:
+2
-2
@@ -331,13 +331,13 @@ connection_init(time_t now, connection_t *conn, int type, int socket_family)
|
||||
|
||||
conn->type = type;
|
||||
conn->socket_family = socket_family;
|
||||
#ifndef USE_BUFFEREVENTS
|
||||
if (!connection_is_listener(conn)) {
|
||||
/* listeners never use their buf */
|
||||
/* XXX and bufferevents don't either, but for now we leave this here
|
||||
* so that linked connections can still work. */
|
||||
conn->inbuf = buf_new();
|
||||
conn->outbuf = buf_new();
|
||||
}
|
||||
#endif
|
||||
|
||||
conn->timestamp_created = now;
|
||||
conn->timestamp_lastread = now;
|
||||
|
||||
@@ -925,7 +925,11 @@ run_connection_housekeeping(int i, time_t now)
|
||||
the connection or send a keepalive, depending. */
|
||||
|
||||
or_conn = TO_OR_CONN(conn);
|
||||
#ifdef USE_BUFFEREVENTS
|
||||
tor_assert(conn->bufev);
|
||||
#else
|
||||
tor_assert(conn->outbuf);
|
||||
#endif
|
||||
|
||||
if (or_conn->is_bad_for_new_circs && !or_conn->n_circuits) {
|
||||
/* It's bad for new circuits, and has no unmarked circuits on it:
|
||||
|
||||
Reference in New Issue
Block a user