瀏覽代碼

tm: flag core to use forced socket when uac socket is set

- without flag SND_F_FORCE_SOCKET probing by dispatcher module
  and route script function t_uac_send() will choose incorrect source socket
Mikko Lehto 7 年之前
父節點
當前提交
7da5e5b0a1
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/modules/tm/uac.c

+ 6 - 0
src/modules/tm/uac.c

@@ -428,6 +428,12 @@ static inline int t_uac_prepare(uac_req_t *uac_r,
 	/* new message => take the dialog send_socket if set, or the default
 	  send_socket if not*/
 	SND_FLAGS_INIT(&snd_flags);
+
+	if (uac_r->dialog->send_sock != NULL)
+	{
+		snd_flags.f |= SND_F_FORCE_SOCKET;
+	}
+
 #ifdef USE_DNS_FAILOVER
 	if ((uri2dst2(cfg_get(core, core_cfg, use_dns_failover) ? &new_cell->uac[0].dns_h : 0,
 			&dst, uac_r->dialog->send_sock, snd_flags,