tests: fix close/restart detection after loopback_conn change

7650b93 changed close/restart notifications from NULL to loopback_conn().
Remove !conn check — use entry->len==9 alone to distinguish (9 bytes = svc_id+node_id, data always longer).
This commit is contained in:
evgeny committed 2026-08-11 12:21:10 +03:00
1 parent eea0ce5175
commit 5fce3371d3
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -128,7 +128,7 @@ static void cleanup(void) { test_unlink(a_conf); test_unlink(b_conf); test_unlin
static void recv_handler(struct ETCP_CONN* conn, struct ll_entry* entry) {
if (!entry || !entry->dgram) { fprintf(stderr, "RECV: null entry\n"); g_test_ok=-1; g_fail_code=10; return; }
if (!conn && entry->len == 9) { queue_dgram_free(entry); queue_entry_free(entry); return; }
if (entry->len == 9) { queue_dgram_free(entry); queue_entry_free(entry); return; }
if (entry->len < 7) { fprintf(stderr, "RECV: short entry len=%u\n", (unsigned)entry->len); g_test_ok=-1; g_fail_code=10; queue_dgram_free(entry); queue_entry_free(entry); return; }
uint32_t seq=0; memcpy(&seq,entry->dgram+1,4);
uint16_t sz=0; memcpy(&sz, entry->dgram+5,2);
+1 -1
View File
@@ -44,7 +44,7 @@ static void test_handler(struct ETCP_CONN* conn, struct ll_entry* entry) {
return;
}
// close/restart: len==9 (svc_id + node_id), conn==NULL
if (entry->len == 9 && !conn) {
if (entry->len == 9) {
g_notify_count++;
queue_dgram_free(entry); queue_entry_free(entry);
return;