From 28bfa671a1c73b27d6060c07668097761dcd085c Mon Sep 17 00:00:00 2001 From: Tom Early Date: Tue, 7 Dec 2021 12:39:01 -0700 Subject: [PATCH] more bug fixes --- reflector/M17Protocol.cpp | 2 +- reflector/Protocol.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reflector/M17Protocol.cpp b/reflector/M17Protocol.cpp index 01d29e0..552b3b6 100644 --- a/reflector/M17Protocol.cpp +++ b/reflector/M17Protocol.cpp @@ -170,7 +170,7 @@ void CM17Protocol::Task(void) void CM17Protocol::OnDvHeaderPacketIn(std::unique_ptr &Header, const CIp &Ip) { // find the stream - auto stream = GetStream(Header->GetStreamId()); + auto stream = GetStream(Header->GetStreamId(), &Ip); if ( stream ) { // stream already open diff --git a/reflector/Protocol.cpp b/reflector/Protocol.cpp index e9a7f22..04b6825 100644 --- a/reflector/Protocol.cpp +++ b/reflector/Protocol.cpp @@ -156,7 +156,7 @@ std::shared_ptr CProtocol::GetStream(uint16_t uiStreamId, const C if (it == m_Streams.end()) return nullptr; - if (it->second->GetOwnerIp() != nullptr) + if (Ip != nullptr && it->second->GetOwnerIp() != nullptr) { if (*Ip == *it->second->GetOwnerIp()) {