Browse Source

Set radio invitation timeout to one minute

stream-multiview
evgeny 6 days ago
parent
commit
949c300c53
  1. 4
      src/radio/radio_call.c
  2. 2
      src/radio/radio_call.h

4
src/radio/radio_call.c

@ -108,7 +108,7 @@ static struct TOPO_GROUP* rc_group(struct UTUN_INSTANCE* inst, uint64_t group, u
return g;
}
/* Единый монотонный deadline: OUTGOING=2с, RINGING=45с от начала, callee lease=2с. */
/* Единый монотонный deadline: OUTGOING=2с, RINGING=60с от начала, callee lease=2с. */
static void rc_tick(void* arg) {
struct radio_call_context* ctx = arg;
ctx->timer = NULL;
@ -258,7 +258,7 @@ int radio_call_init(struct UTUN_INSTANCE* inst) {
if (etcp_router_bind(inst, ETCP_RT_ID_RADIO_CALL, rc_receive)) { radio_call_destroy(inst); return -1; }
ctx->timer = uasync_set_timeout(inst->ua, RC_TICK_TB, ctx, rc_tick, "radio_call");
if (!ctx->timer) { DEBUG_ERROR(DEBUG_CATEGORY_RADIO, "radio call init timer failed"); radio_call_destroy(inst); return -1; }
DEBUG_INFO(DEBUG_CATEGORY_RADIO, "radio call initialized first_response_ms=2000 ring_ms=45000 cache=%d", RC_SLOTS);
DEBUG_INFO(DEBUG_CATEGORY_RADIO, "radio call initialized first_response_ms=2000 ring_ms=60000 cache=%d", RC_SLOTS);
return 0;
}

2
src/radio/radio_call.h

@ -26,7 +26,7 @@ enum radio_call_action {
/* Таймауты в timebase 0.1мс; повторы не сдвигают первоначальный deadline. */
#define RADIO_CALL_RESPONSE_TB 20000
#define RADIO_CALL_RING_TB 450000
#define RADIO_CALL_RING_TB 600000
#define RADIO_CALL_RETRY_TB 3000
#define RADIO_CALL_CACHE_TB 700000

Loading…
Cancel
Save