summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/or/conflux.c8
-rw-r--r--src/core/or/relay.c3
2 files changed, 8 insertions, 3 deletions
diff --git a/src/core/or/conflux.c b/src/core/or/conflux.c
index eb004b3626..ab464f3446 100644
--- a/src/core/or/conflux.c
+++ b/src/core/or/conflux.c
@@ -467,8 +467,12 @@ conflux_decide_circ_for_send(conflux_t *cfx,
* so these commands arrive in-order. */
if (!new_circ && relay_command != RELAY_COMMAND_DATA) {
/* Curr leg should be set, because conflux_decide_next_circ() should
- * have set it earlier. */
- tor_assert(cfx->curr_leg);
+ * have set it earlier. No BUG() here because the only caller BUG()s. */
+ if (!cfx->curr_leg) {
+ log_warn(LD_BUG, "No current leg for conflux with relay command %d",
+ relay_command);
+ return NULL;
+ }
return cfx->curr_leg->circ;
}
diff --git a/src/core/or/relay.c b/src/core/or/relay.c
index 3af9435a76..893daa09fd 100644
--- a/src/core/or/relay.c
+++ b/src/core/or/relay.c
@@ -639,7 +639,8 @@ relay_send_command_from_edge_,(streamid_t stream_id, circuit_t *orig_circ,
circ = conflux_decide_circ_for_send(orig_circ->conflux, orig_circ,
relay_command);
if (BUG(!circ)) {
- log_warn(LD_BUG, "No circuit to send on for conflux");
+ log_warn(LD_BUG, "No circuit to send for conflux for relay command %d, "
+ "called from %s:%d", relay_command, filename, lineno);
circ = orig_circ;
} else {
/* Conflux circuits always send multiplexed relay commands to