khan: bail on unknown effects
Also move sev_l into kick, and do some whitespace cleanup.
@@ -283,12 +283,6 @@ _khan_ef_handle(u3_khan* kan_u,
// TODO: socket events (close connection; any others?)
- // TODO move into kick
- if ( sev_l != kan_u->sev_l ) {
- u3l_log("khan: server instance not found: %x\n", sev_l);
- u3z(tag); u3z(dat);
- return;
- }
if ( 0 != (can_u = _khan_search_chan(kan_u, sev_l, coq_l)) ) {
if ( c3__avow == tag ) {
c3_y* byt_y;
@@ -300,7 +294,7 @@ _khan_ef_handle(u3_khan* kan_u,
u3_newt_send((u3_mojo*)&can_u->mor_u, len_d, byt_y);
}
else {
- u3l_log("khan: handle-other\n");
+ can_u->mor_u.bal_f(&can_u, -1, "handle-other");
}
}
else {
@@ -377,7 +371,8 @@ _khan_io_kick(u3_auto* car_u, u3_noun wir, u3_noun cad)
c3_l sev_l, coq_l, seq_l;
if ( (c3n == u3r_cell(pud, &p_pud, &t_pud)) ||
- (c3n == _reck_lily(c3__uv, u3k(p_pud), &sev_l)) )
+ (c3n == _reck_lily(c3__uv, u3k(p_pud), &sev_l)) ||
+ sev_l != kan_u->sev_l )
{
u3z(wir); u3z(cad);
return c3n;
