conn->state = OR_CONN_STATE_OPEN;
directory_set_dirty();
connection_watch_events(conn, POLLIN);
+ log_fn(LOG_DEBUG,"tls handshake done. verifying.");
if(options.OnionRouter) { /* I'm an OR */
if(tor_tls_peer_has_cert(conn->tls)) { /* it's another OR */
pk = tor_tls_verify(conn->tls);
conn->bandwidth = DEFAULT_BANDWIDTH_OP;
circuit_n_conn_open(conn); /* send the pending create */
}
- log_fn(LOG_DEBUG,"tls handshake done, now open.");
return 0;
}
#endif
}
#ifdef USE_TLS
- assert(conn->state == OR_CONN_STATE_OPEN);
+ if(conn->state != OR_CONN_STATE_OPEN)
+ return 0; /* don't do anything */
return connection_process_cell_from_inbuf(conn);
#else
// log(LOG_DEBUG,"connection_or_process_inbuf(): state %d.",conn->state);
}
/* the connect has finished. */
- log_fn(LOG_DEBUG,"OR connection to router %s:%u established.",
+ log_fn(LOG_DEBUG,"OR connect() to router %s:%u finished.",
conn->address,conn->port);
#ifdef USE_TLS