Skip to content

Commit 52c7db0

Browse files
committed
fix: rbdns loop
1 parent 78d496f commit 52c7db0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"maintainer": true
1515
}
1616
],
17-
"version": "14.0.0",
17+
"version": "14.0.1",
1818
"frameworks": ["espidf", "arduino"],
1919
"platforms": "espressif32"
2020
}

src/rbdns.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "lwip/err.h"
22
#include "lwip/sockets.h"
33
#include "lwip/sys.h"
4-
#include <esp_log.h>
54
#include <cstring>
5+
#include <esp_log.h>
66

77
#include "rbdns.h"
88
#include "rbwifi.h"
@@ -63,7 +63,7 @@ void DnsServer::start(const char* local_hostname, std::function<uint32_t()> get_
6363
m_local_hostname = local_hostname;
6464
m_get_local_ip = get_local_ip;
6565

66-
if(!m_get_local_ip) {
66+
if (!m_get_local_ip) {
6767
m_get_local_ip = &rb::WiFi::getIp;
6868
}
6969

@@ -120,7 +120,7 @@ ssize_t DnsServer::receivePacket(std::vector<uint8_t>& buff, struct sockaddr_in*
120120
return -1;
121121
}
122122

123-
if (msg_size < buff.size() || msg_size > DNS_MSG_SIZE_LIMIT)
123+
if (msg_size <= buff.size() || msg_size > DNS_MSG_SIZE_LIMIT)
124124
break;
125125
buff.resize(msg_size);
126126
}

0 commit comments

Comments
 (0)