From 741771c4fe47d0097435a4bda6ecffa6940cd5b3 Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Fri, 3 Nov 2023 11:49:25 -0400 Subject: [PATCH] added diags for debug tracking... --- Wifi_NINA.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Wifi_NINA.cpp b/Wifi_NINA.cpp index 1ae888b..ba57f00 100644 --- a/Wifi_NINA.cpp +++ b/Wifi_NINA.cpp @@ -378,7 +378,7 @@ void WifiNINA::checkForNewClient() { for (byte clientId=0; clientIdconnected()) { DIAG(F("Remove client %d"), clientId); CommandDistributor::forget(clientId); - //delete c; // this causes a crash when client drops.. commenting out for now + //delete c; //TJF: this causes a crash when client drops.. commenting out for now. clients[clientId]=nullptr; } } @@ -423,10 +423,14 @@ void WifiNINA::checkForClientOutput() { if (!c) { // client is gone, throw away msg for (int i=0;iread(); + DIAG(F("gone, drop message.")); //TJF: only for diag return; } // emit data to the client object // This should work in theory, the + DIAG(F("send message")); //TJF: only for diag + //TJF: the old code had to add a 0x00 byte to the end to terminate the + //TJF: c string, before sending it. i take it this is not needed? for (int i=0;iwrite(outboundRing->read()); }