Skip to content

Commit

Permalink
Bugfix.
Browse files Browse the repository at this point in the history
- respect net debug on/off state
  • Loading branch information
blazoncek committed Feb 8, 2023
1 parent bca9288 commit e7d50d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wled00/net_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifdef WLED_DEBUG_HOST

size_t NetworkDebugPrinter::write(uint8_t c) {
if (!WLED_CONNECTED) return 0;
if (!WLED_CONNECTED || !netDebugEnabled) return 0;

if (!debugPrintHostIP && !debugPrintHostIP.fromString(netDebugPrintHost)) {
#ifdef ESP8266
Expand All @@ -24,7 +24,7 @@ size_t NetworkDebugPrinter::write(uint8_t c) {
}

size_t NetworkDebugPrinter::write(const uint8_t *buf, size_t size) {
if (!WLED_CONNECTED || buf == nullptr) return 0;
if (!WLED_CONNECTED || buf == nullptr || !netDebugEnabled) return 0;

if (!debugPrintHostIP && !debugPrintHostIP.fromString(netDebugPrintHost)) {
#ifdef ESP8266
Expand Down

0 comments on commit e7d50d2

Please sign in to comment.