Skip to content

Commit

Permalink
fix: rbdns loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Tasssadar committed Jul 8, 2024
1 parent 78d496f commit 52c7db0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"maintainer": true
}
],
"version": "14.0.0",
"version": "14.0.1",
"frameworks": ["espidf", "arduino"],
"platforms": "espressif32"
}
6 changes: 3 additions & 3 deletions src/rbdns.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "lwip/err.h"
#include "lwip/sockets.h"
#include "lwip/sys.h"
#include <esp_log.h>
#include <cstring>
#include <esp_log.h>

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

if(!m_get_local_ip) {
if (!m_get_local_ip) {
m_get_local_ip = &rb::WiFi::getIp;
}

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

if (msg_size < buff.size() || msg_size > DNS_MSG_SIZE_LIMIT)
if (msg_size <= buff.size() || msg_size > DNS_MSG_SIZE_LIMIT)
break;
buff.resize(msg_size);
}
Expand Down

0 comments on commit 52c7db0

Please sign in to comment.