Fix a couple of bufferevent incompatibilities that snuck in.

This commit is contained in:
Nick Mathewson
2010-02-02 17:49:42 -05:00
parent 0c9b64d449
commit 98ec959c9c
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -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;
+4
View File
@@ -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: