Skip to content

Commit

Permalink
add ptr check
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Jun 23, 2021
1 parent 8f7386e commit 9e1ea1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ProxyChannel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13841,7 +13841,7 @@ void UDPProxySocket::SetForwardDestination(const Address & srcIP, WORD srcPort,

// doing port detection and forward source is already set (probably by port detection) and set to same as forward dest -> swap the directions (OR skip the setting ?)
H245_UnicastAddress fSrc = SocketToH245UnicastAddr(fSrcIP, fSrcPort); // for easy comparison
if (m_ignoreSignaledIPs && fSrc == *dstAddr) {
if (m_ignoreSignaledIPs && dstAddr && fSrc == *dstAddr) {
PTRACE(7, "JW RTP swap directions before SetForwardDestination to avoid loop");
swap(fSrcIP, rSrcIP); swap(fSrcPort, rSrcPort);
swap(fDestIP, rDestIP); swap(fDestPort, rDestPort);
Expand Down Expand Up @@ -13906,7 +13906,7 @@ void UDPProxySocket::SetReverseDestination(const Address & srcIP, WORD srcPort,

// doing port detection and reverse source is already set (probably by port detection) and set to same as reverse dest -> swap the directions (OR skip the setting ?)
H245_UnicastAddress rSrc = SocketToH245UnicastAddr(rSrcIP, rSrcPort); // for easy comparison
if (m_ignoreSignaledIPs && rSrc == *dstAddr) {
if (m_ignoreSignaledIPs && dstAddr && rSrc == *dstAddr) {
PTRACE(7, "JW RTP swap directions before SetReverseDestination to avoid loop");
swap(fSrcIP, rSrcIP); swap(fSrcPort, rSrcPort);
swap(fDestIP, rDestIP); swap(fDestPort, rDestPort);
Expand Down

0 comments on commit 9e1ea1b

Please sign in to comment.