Initialize radio router channels before checking send backpressure
This commit is contained in:
1 parent
a73d829080
commit
5f9e9975d3
2 files changed
+20
-3
No files matched your search
+2
-1
@@ -117,7 +117,8 @@ static etcp_recv_fn g_call_recv[3];
|
||||
static void call_packet_loss(struct ETCP_CONN* conn, struct ll_entry* entry) {
|
||||
int idx = -1;
|
||||
for (int i = 0; i < 3; ++i) if (conn->instance->node_id == g_sh.nid[i]) idx = i;
|
||||
if (idx < 0 || !entry || entry->len <= ROUTER_SVC_PAYLOAD_OFF) abort();
|
||||
if (idx < 0 || !entry) abort();
|
||||
if (entry->len <= ROUTER_SVC_PAYLOAD_OFF) { g_call_recv[idx](conn, entry); return; }
|
||||
int cmd = entry->dgram[ROUTER_SVC_PAYLOAD_OFF];
|
||||
if ((idx == IDX_A && cmd == 3 && g_drop_result-- > 0) || (idx == IDX_C && cmd == 4 && g_drop_ack-- > 0)) {
|
||||
DEBUG_INFO(DEBUG_CATEGORY_RADIO, "test drops radio result/ACK dst=%d command=%d", idx, cmd);
|
||||
|
||||
Reference in new issue
Block a user