Open both fake GATT endpoints before delivering HELLO

This commit is contained in:
evgeny committed 2026-10-29 22:22:35 +01:00
1 parent 358c3093dd
commit 6338a2aae1
2 files changed
+4

No files matched your search

+2
View File
@@ -71,6 +71,8 @@ static void run(void* arg) {
}
if (!f->len) { f->len = 1; ble_backend_opened(b->owner, f->id, mtu); }
if (!f->pending || hold) continue;
struct fake_link* target = f->peer ? slot(f->peer, f->other) : NULL;
if (target && !target->len) { schedule(b); continue; } /* Удалённая подписка должна завершиться до доставки HELLO. */
ble_link_id id = f->id, other = f->other;
struct ble_backend* peer = f->peer;
uint8_t data[512]; size_t len = f->len; memcpy(data, f->data, len); f->pending = 0;
@@ -75,6 +75,8 @@ static void run(void* arg) {
struct fake_link* f = &b->links[i]; if (!f->id) continue;
if (!f->len) { f->len = 1; ble_backend_opened(b->owner, f->id, mtu); }
if (!f->pending || hold) continue;
struct fake_link* target = f->peer ? slot(f->peer, f->other) : NULL;
if (target && !target->len) { schedule(b); continue; } /* Не доставлять HELLO до удалённого opened. */
ble_link_id id = f->id, other = f->other;
struct ble_backend* peer = f->peer;
uint8_t data[512]; size_t len = f->len; memcpy(data, f->data, len); f->pending = 0;