-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Final PacketBufferHandle cleanup. #4364
Changes from 1 commit
5342400
33c4c95
d809471
6ff2093
4ddf562
e50197a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,8 +74,6 @@ | |
namespace chip { | ||
namespace Inet { | ||
|
||
using chip::System::PacketBuffer; | ||
|
||
chip::System::ObjectPool<RawEndPoint, INET_CONFIG_NUM_RAW_ENDPOINTS> RawEndPoint::sPool; | ||
|
||
#if CHIP_SYSTEM_CONFIG_USE_LWIP | ||
|
@@ -623,20 +621,20 @@ INET_ERROR RawEndPoint::SendMsg(const IPPacketInfo * pktInfo, chip::System::Pack | |
#if LWIP_VERSION_MAJOR > 1 || LWIP_VERSION_MINOR >= 5 | ||
ip_addr_t ipAddr = addr.ToLwIPAddr(); | ||
|
||
lwipErr = raw_sendto(mRaw, msg.GetLwIPpbuf(), &ipAddr); | ||
lwipErr = raw_sendto(mRaw, msg.UnsafeGetLwIPpbuf(), &ipAddr); | ||
#else // LWIP_VERSION_MAJOR <= 1 && LWIP_VERSION_MINOR < 5 | ||
if (PCB_ISIPV6(mRaw)) | ||
{ | ||
ip6_addr_t ipv6Addr = addr.ToIPv6(); | ||
|
||
lwipErr = raw_sendto_ip6(mRaw, msg.GetLwIPpbuf(), &ipv6Addr); | ||
lwipErr = raw_sendto_ip6(mRaw, msg.UnsafeGetLwIPpbuf(), &ipv6Addr); | ||
} | ||
#if INET_CONFIG_ENABLE_IPV4 | ||
else | ||
{ | ||
ip4_addr_t ipv4Addr = addr.ToIPv4(); | ||
|
||
lwipErr = raw_sendto(mRaw, msg.GetLwIPpbuf(), &ipv4Addr); | ||
lwipErr = raw_sendto(mRaw, msg.UnsafeGetLwIPpbuf(), &ipv4Addr); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to use |
||
} | ||
#endif // INET_CONFIG_ENABLE_IPV4 | ||
#endif // LWIP_VERSION_MAJOR <= 1 || LWIP_VERSION_MINOR >= 5 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,8 +76,6 @@ | |
namespace chip { | ||
namespace Inet { | ||
|
||
using chip::System::PacketBuffer; | ||
|
||
chip::System::ObjectPool<UDPEndPoint, INET_CONFIG_NUM_UDP_ENDPOINTS> UDPEndPoint::sPool; | ||
|
||
#if CHIP_SYSTEM_CONFIG_USE_LWIP | ||
|
@@ -578,9 +576,9 @@ INET_ERROR UDPEndPoint::SendMsg(const IPPacketInfo * pktInfo, System::PacketBuff | |
} | ||
|
||
if (intfId != INET_NULL_INTERFACEID) | ||
lwipErr = udp_sendto_if(mUDP, msg.GetLwIPpbuf(), &lwipDestAddr, destPort, intfId); | ||
lwipErr = udp_sendto_if(mUDP, msg.UnsafeGetLwIPpbuf(), &lwipDestAddr, destPort, intfId); | ||
else | ||
lwipErr = udp_sendto(mUDP, msg.GetLwIPpbuf(), &lwipDestAddr, destPort); | ||
lwipErr = udp_sendto(mUDP, msg.UnsafeGetLwIPpbuf(), &lwipDestAddr, destPort); | ||
|
||
ip_addr_copy(mUDP->local_ip, boundAddr); | ||
|
||
|
@@ -600,9 +598,9 @@ INET_ERROR UDPEndPoint::SendMsg(const IPPacketInfo * pktInfo, System::PacketBuff | |
} | ||
|
||
if (intfId != INET_NULL_INTERFACEID) | ||
lwipErr = udp_sendto_if_ip6(mUDP, msg.GetLwIPpbuf(), &lwipDestAddr, destPort, intfId); | ||
lwipErr = udp_sendto_if_ip6(mUDP, msg.UnsafeGetLwIPpbuf(), &lwipDestAddr, destPort, intfId); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to use |
||
else | ||
lwipErr = udp_sendto_ip6(mUDP, msg.GetLwIPpbuf(), &lwipDestAddr, destPort); | ||
lwipErr = udp_sendto_ip6(mUDP, msg.UnsafeGetLwIPpbuf(), &lwipDestAddr, destPort); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to use |
||
} | ||
|
||
#if INET_CONFIG_ENABLE_IPV4 | ||
|
@@ -619,9 +617,9 @@ INET_ERROR UDPEndPoint::SendMsg(const IPPacketInfo * pktInfo, System::PacketBuff | |
} | ||
|
||
if (intfId != INET_NULL_INTERFACEID) | ||
lwipErr = udp_sendto_if(mUDP, msg.GetLwIPpbuf(), &lwipDestAddr, destPort, intfId); | ||
lwipErr = udp_sendto_if(mUDP, msg.UnsafeGetLwIPpbuf(), &lwipDestAddr, destPort, intfId); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to use |
||
else | ||
lwipErr = udp_sendto(mUDP, msg.GetLwIPpbuf(), &lwipDestAddr, destPort); | ||
lwipErr = udp_sendto(mUDP, msg.UnsafeGetLwIPpbuf(), &lwipDestAddr, destPort); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done and thanks for catching that. Looks like I rushed that change and stopped when the active builds worked. |
||
} | ||
|
||
ipX_addr_copy(mUDP->local_ip, boundAddr); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to use
LwIPPacketBufferView