log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
"connection_edge_process_relay_cell (away from origin) "
"failed.");
- return reason;
+ goto error;
}
- }
- if (cell_direction == CELL_DIRECTION_IN) {
+ } else if (cell_direction == CELL_DIRECTION_IN) {
++stats_n_relay_cells_delivered;
log_debug(LD_OR,"Sending to origin.");
- reason = connection_edge_process_relay_cell(cell, circ, conn,
+ reason = connection_edge_process_relay_cell(msg, circ, conn,
layer_hint);
if (reason < 0) {
/* If a client is trying to connect to unknown hidden service port,