mirror of https://github.com/ArduPilot/ardupilot
AP_HAL: added IP4_STR_LEN
This commit is contained in:
parent
4e49481d3a
commit
07fee626d9
|
@ -360,8 +360,7 @@ ssize_t SOCKET_CLASS_NAME::recv(void *buf, size_t size, uint32_t timeout_ms)
|
|||
*/
|
||||
void SOCKET_CLASS_NAME::last_recv_address(const char *&ip_addr, uint16_t &port) const
|
||||
{
|
||||
// 16 bytes for aaa.bbb.ccc.ddd with null term
|
||||
static char buf[16];
|
||||
static char buf[IP4_STR_LEN];
|
||||
auto *str = last_recv_address(buf, sizeof(buf), port);
|
||||
ip_addr = str;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#error "Don't include Socket.hpp directly"
|
||||
#endif
|
||||
|
||||
#define IP4_STR_LEN 16
|
||||
|
||||
class SOCKET_CLASS_NAME {
|
||||
public:
|
||||
SOCKET_CLASS_NAME(bool _datagram);
|
||||
|
|
Loading…
Reference in New Issue