Initialize replication router queues before waiting for room
This commit is contained in:
1 parent
b4b11d6086
commit
d3bc77922b
2 files changed
+6
-2
No files matched your search
@@ -474,7 +474,7 @@ failed:
|
||||
}
|
||||
|
||||
/* Watchdog и waiter только планируют pump; это безопасно при синхронном callback очереди. */
|
||||
static void md_repl_ready(void* arg) { md_repl_schedule(arg); }
|
||||
static void md_repl_ready(struct ll_queue* queue, void* arg) { (void)queue; md_repl_schedule(arg); }
|
||||
|
||||
static void md_repl_pump(void* arg) {
|
||||
struct media_super_peer* peer = arg;
|
||||
@@ -482,6 +482,9 @@ static void md_repl_pump(void* arg) {
|
||||
peer->pump = NULL;
|
||||
if (!md->initialized || md_group_role(md, peer->group_id, md->self_node_id) != 1
|
||||
|| md_group_role(md, peer->group_id, peer->peer_node_id) != 1) return;
|
||||
if (!etcp_router_conn_get(md->inst, peer->group_id, peer->peer_node_id, ETCP_RT_ID_MEDIA_DELIVERY)) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_MEDIA, "%s: replication router channel allocation failed", MD_ID); return;
|
||||
}
|
||||
etcp_router_cancel_send_ready(md->inst, peer->group_id, peer->peer_node_id, ETCP_RT_ID_MEDIA_DELIVERY, &peer->waiter);
|
||||
/* Максимум три пакета за вызов: ответ, свой запрос и подсказка. */
|
||||
for (int budget = 0; budget < 3; budget++) {
|
||||
|
||||
+2
-1
@@ -905,7 +905,8 @@ check_PROGRAMS += test_media_replication
|
||||
test_media_replication_SOURCES = test_media_replication.c media_delivery_fixture.h
|
||||
test_media_replication_CFLAGS = $(test_media_delivery_download_CFLAGS)
|
||||
test_media_replication_LDADD = $(LIBUTUN) $(CRYPTO_LIBS) $(COMMON_LIBS)
|
||||
test_media_replication_LDFLAGS = -Wl,--wrap=etcp_route_send -Wl,--wrap=RAND_bytes
|
||||
test_media_replication_LDFLAGS = -Wl,--wrap=etcp_route_send -Wl,--wrap=RAND_bytes \
|
||||
-Wl,--wrap=conn_mgr_open -Wl,--wrap=conn_mgr_close
|
||||
|
||||
if OS_LINUX
|
||||
check_PROGRAMS += test_media_blocks
|
||||
|
||||
Reference in new issue
Block a user