Browse code

rr: debug messages when setting send socket on double rr

Daniel-Constantin Mierla authored on 26/11/2019 10:25:46
Showing 1 changed files
... ...
@@ -754,9 +754,13 @@ static inline void rr_do_force_send_socket(sip_msg_t *_m, sip_uri_t *puri,
754 754
 	if ((si = grep_sock_info(&puri->host,
755 755
 				puri->port_no?puri->port_no:proto_default_port(puri->proto),
756 756
 				puri->proto)) != 0) {
757
+		LM_DBG("set send socket %p for local route uri: %.*s\n", si,
758
+				rt->nameaddr.uri.len, ZSW(rt->nameaddr.uri.s));
757 759
 		set_force_socket(_m, si);
758 760
 	} else if ((si = grep_sock_info(&puri->host, puri->port_no,
759 761
 					puri->proto)) != 0) {
762
+		LM_DBG("set send socket %p for local route uri: %.*s\n", si,
763
+				rt->nameaddr.uri.len, ZSW(rt->nameaddr.uri.s));
760 764
 		set_force_socket(_m, si);
761 765
 	} else {
762 766
 		if (enable_socket_mismatch_warning && rr2on) {
... ...
@@ -766,6 +770,9 @@ static inline void rr_do_force_send_socket(sip_msg_t *_m, sip_uri_t *puri,
766 766
 				LM_WARN("second RR uri is not myself (%.*s)\n",
767 767
 						rt->nameaddr.uri.len, ZSW(rt->nameaddr.uri.s));
768 768
 			}
769
+		} else {
770
+			LM_DBG("no socket found to match second RR (%.*s)\n",
771
+					rt->nameaddr.uri.len, ZSW(rt->nameaddr.uri.s));
769 772
 		}
770 773
 	}
771 774
 }