more bug fixes

This commit is contained in:
Tom Early committed 2021-12-07 12:39:01 -07:00
1 parent af9a5d9592
commit 28bfa671a1
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -170,7 +170,7 @@ void CM17Protocol::Task(void)
void CM17Protocol::OnDvHeaderPacketIn(std::unique_ptr<CDvHeaderPacket> &Header, const CIp &Ip)
{
// find the stream
auto stream = GetStream(Header->GetStreamId());
auto stream = GetStream(Header->GetStreamId(), &Ip);
if ( stream )
{
// stream already open
+1 -1
View File
@@ -156,7 +156,7 @@ std::shared_ptr<CPacketStream> 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())
{