Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 4 additions & 2 deletions libraries/SimpleMDNS/src/SimpleMDNS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include <LwipEthernet.h>
#include <lwip/apps/mdns.h>

void SimpleMDNS::begin(const char *hostname, unsigned int ttl) {
bool SimpleMDNS::begin(const char *hostname, unsigned int ttl) {
if (_running) {
return;
return false;
}
mdns_resp_init();
struct netif *n = netif_list;
Expand All @@ -37,6 +37,8 @@ void SimpleMDNS::begin(const char *hostname, unsigned int ttl) {
__setStateChangeCallback(_statusCB);
_hostname = strdup(hostname);
_running = true;

return true;
}

void SimpleMDNS::enableArduino(unsigned int port, bool passwd) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/SimpleMDNS/src/SimpleMDNS.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class SimpleMDNS {

public:
void begin(const char *hostname, unsigned int ttl = 60);
bool begin(const char *hostname, unsigned int ttl = 60);
void enableArduino(unsigned int port, bool passwd = false);
void addService(const char *service, const char *proto, unsigned int port);

Expand Down
Loading