* just give up: for circ to close, and return 0.
*/
int circuit_truncated(circuit_t *circ, crypt_path_t *layer) {
- crypt_path_t *victim;
- connection_t *stream;
+// crypt_path_t *victim;
+// connection_t *stream;
tor_assert(circ && CIRCUIT_IS_ORIGIN(circ));
tor_assert(layer);
circuit_mark_for_close(circ);
return 0;
+#if 0
while(layer->next != circ->cpath) {
/* we need to clear out layer->next */
victim = layer->next;
log_fn(LOG_INFO, "finished");
return 0;
+#endif
}
/** Decide whether the first bit of the circuit ID will be
tor_assert(cp->handshake_state);
break;
default:
+ log_fn(LOG_WARN,"Unexpected state %d",cp->state);
tor_assert(0);
}
tor_assert(cp->package_window >= 0);
tor_assert(circ && conn);
+ conn->cpath_layer = NULL; /* make sure we don't keep a stale pointer */
+
if(conn == circ->p_streams) {
circ->p_streams = conn->next_stream;
return;