Browse code

tm: improve comment related to dns failover, add debug output in this case

Henning Westerholt authored on 19/08/2022 14:02:16
Showing 1 changed files
... ...
@@ -442,12 +442,14 @@ inline static void final_response_handler(
442 442
 					BLST_ERR_TIMEOUT, &r_buf->dst, r_buf->my_T->uas.request);
443 443
 #endif
444 444
 #ifdef USE_DNS_FAILOVER
445
-		/* if this is an invite, the destination resolves to more ips, and
446
-		 *  it still hasn't passed more than fr_inv_timeout since we
447
-		 *  started, add another branch/uac */
445
+		/* if this is an request, the destination resolves to more IPs, and
446
+		 * it still hasn't passed more than max_inv_lifetime or
447
+		 * max_noninv_lifetimesince we started, add another branch/uac */
448 448
 		if(cfg_get(core, core_cfg, use_dns_failover)) {
449 449
 			now = get_ticks_raw();
450 450
 			if((s_ticks_t)(t->end_of_life - now) > 0) {
451
+				LM_DBG("send on branch %d failed, adding another branch\n",
452
+						r_buf->branch);
451 453
 				branch_ret = add_uac_dns_fallback(
452 454
 						t, t->uas.request, &t->uac[r_buf->branch], 0);
453 455
 				prev_branch = -1;