From e69900b4e7c0b8fe10213913f01661b51043bbc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Ma=C5=82ecki?= Date: Fri, 12 Jul 2024 09:14:31 +0200 Subject: [PATCH] Small refax and minor warning fix --- srtcore/channel.cpp | 9 ++++++++- srtcore/queue.h | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/srtcore/channel.cpp b/srtcore/channel.cpp index 69e725fec..98a237f16 100644 --- a/srtcore/channel.cpp +++ b/srtcore/channel.cpp @@ -667,7 +667,14 @@ int srt::CChannel::sendto(const sockaddr_any& addr, CPacket& packet, const CNetw #if ENABLE_HEAVY_LOGGING ostringstream dsrc; #ifdef SRT_ENABLE_PKTINFO - dsrc << " sourceIP=" << (m_bBindMasked && !source_ni.address.isany() ? source_ni.address.str() : "default"); + if (m_bBindMasked && !source_ni.address.isany()) + { + dsrc << " sourceNI=" << source_ni.str(); + } + else + { + dsrc << " sourceNI=default"; + } #endif LOGC(kslog.Debug, diff --git a/srtcore/queue.h b/srtcore/queue.h index 1dd5b01e7..098fa24f8 100644 --- a/srtcore/queue.h +++ b/srtcore/queue.h @@ -592,6 +592,10 @@ struct CMultiplexer , m_pRcvQueue(NULL) , m_pChannel(NULL) , m_pTimer(NULL) + , m_iPort(0) + , m_iIPversion(AF_UNSPEC) + , m_iRefCount(1) + , m_iID(-1) { }