Browse code

sipdump: make dest ipv6 addresses without square brackets

(cherry picked from commit 0a61ec2f137414a7bfc2535dfe4df9b72e500cf8)

Daniel-Constantin Mierla authored on 16/09/2022 12:31:44
Showing 1 changed files
... ...
@@ -422,7 +422,8 @@ int sipdump_msg_sent(sr_event_param_t *evp)
422 422
 		isd.src_port = (int)evp->dst->send_sock->port_no;
423 423
 	}
424 424
 	su2ip_addr(&ip, &evp->dst->to);
425
-	isd.dst_ip.len = ip_addr2sbufz(&ip, dstip_buf, IP_ADDR_MAX_STRZ_SIZE);
425
+	isd.dst_ip.len = ip_addr2sbuf(&ip, dstip_buf, IP_ADDR_MAX_STRZ_SIZE);
426
+	dstip_buf[isd.dst_ip.len] = '\0';
426 427
 	isd.dst_ip.s = dstip_buf;
427 428
 	isd.dst_port = (int)su_getport(&evp->dst->to);
428 429