8000 LEAmDNS Fixes 1.2 by LaborEtArs · Pull Request #5641 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

LEAmDNS Fixes 1.2 #5641

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

Merged
merged 7 commits into from
Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
LEAmDNS_Fixes_1.2
  • Loading branch information
LaborEtArs committed Jan 20, 2019
commit 2201ce55e79f924bdaacf0ae532b3edb0da495b1
8 changes: 3 additions & 5 deletions libraries/ESP8266mDNS/src/LEAmDNS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ namespace MDNSImplementation {
* MDNSResponder::MDNSResponder
*/
MDNSResponder::MDNSResponder(void)
: m_bInitialized(false),
m_pServices(0),
: m_pServices(0),
m_pUDPContext(0),
m_pcHostname(0),
m_pServiceQueries(0),
Expand Down Expand Up @@ -88,9 +87,9 @@ MDNSResponder::~MDNSResponder(void) {
*/
bool MDNSResponder::begin(const char* p_pcHostname) {

bool bResult = m_bInitialized;
bool bResult = (0 != m_pcHostname);

if (!m_bInitialized) {
if (0 == m_pcHostname) {
if (_setHostname(p_pcHostname)) {

m_GotIPHandler = WiFi.onStationModeGotIP([this](const WiFiEventStationModeGotIP& pEvent) {
Expand Down Expand Up @@ -141,7 +140,6 @@ bool MDNSResponder::close(void) {
_releaseServiceQueries();
_releaseUDPContext();
_releaseHostname();
m_bInitialized = false;

return true;
}
Expand Down
1 change: 0 additions & 1 deletion libraries/ESP8266mDNS/src/LEAmDNS.h
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,6 @@ class MDNSResponder {
};

// Instance variables
bool m_bInitialized;
stcMDNSService* m_pServices;
UdpContext* m_pUDPContext;
char* m_pcHostname;
Expand Down
0