Browse code

sipdump: make dest ipv6 addresses without square brackets

(cherry picked from commit 0a61ec2f137414a7bfc2535dfe4df9b72e500cf8)
(cherry picked from commit d0300a9c69c522b7a6e3f69f21160df30f05f2ff)

Daniel-Constantin Mierla authored on 16/09/2022 12:31:44
Showing 1 changed files
... ...
@@ -408,7 +408,8 @@ int sipdump_msg_sent(sr_event_param_t *evp)
408 408
 		isd.src_port = (int)evp->dst->send_sock->port_no;
409 409
 	}
410 410
 	su2ip_addr(&ip, &evp->dst->to);
411
-	isd.dst_ip.len = ip_addr2sbufz(&ip, dstip_buf, IP_ADDR_MAX_STRZ_SIZE);
411
+	isd.dst_ip.len = ip_addr2sbuf(&ip, dstip_buf, IP_ADDR_MAX_STRZ_SIZE);
412
+	dstip_buf[isd.dst_ip.len] = '\0';
412 413
 	isd.dst_ip.s = dstip_buf;
413 414
 	isd.dst_port = (int)su_getport(&evp->dst->to);
414 415