]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a couple of bufferevent incompatibilities that snuck in.
authorNick Mathewson <nickm@torproject.org>
Tue, 2 Feb 2010 22:49:42 +0000 (17:49 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 27 Sep 2010 18:22:18 +0000 (14:22 -0400)
src/or/connection.c
src/or/main.c

index b5496d72d5256b588d934e23f935cd4832ba958f..2944a0d4bbb0459967118fe25dcc0d038878ccd5 100644 (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;
index 263103662cd58ff26be783506f12ef01bd5bd9bd..f6f26b05f9bff3e1c3812518e7a8e1103cdd75eb 100644 (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: