modules: use pw_net_get_ip

Make pw_net_get_ip also accept NULL ip to just get the port and ip
version. Make rtsp-client use pw_net_get_ip.

Make sure we initialize the iovec before logging in all cases.
This commit is contained in:
Wim Taymans 2026-05-12 12:52:03 +02:00
parent 8860dc809d
commit 6d998a9193
3 changed files with 13 additions and 22 deletions

View file

@ -497,6 +497,8 @@ static void stream_send_packet(void *data, struct iovec *iov, size_t iovlen)
out[0] |= htonl((uint32_t) len + 12);
tcp_pkt[0] = htonl(0x24000000);
out_vec[msg.msg_iovlen++] = (struct iovec) { tcp_pkt, 4 };
} else {
out_vec[2].iov_len = 0;
}
out_vec[msg.msg_iovlen++] = (struct iovec) { header, 12 };