Fedor Kallay
1 day ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
4 additions and
4 deletions
-
examples/simple_repeater/main.cpp
-
examples/simple_room_server/main.cpp
-
examples/simple_secure_chat/main.cpp
-
examples/simple_sensor/main.cpp
|
|
|
@ -135,7 +135,7 @@ void loop() { |
|
|
|
if (c == '\r') break; |
|
|
|
} |
|
|
|
if (len == sizeof(command)-1) { // command buffer full
|
|
|
|
command[sizeof(command)-1] = '\r'; |
|
|
|
command[sizeof(command)-2] = '\r'; // force-complete the line ([len-1] is tested below; [sizeof-1] would clobber the NUL and never match)
|
|
|
|
} |
|
|
|
|
|
|
|
if (len > 0 && command[len - 1] == '\r') { // received complete line
|
|
|
|
|
|
|
|
@ -114,7 +114,7 @@ void loop() { |
|
|
|
Serial.print(c); |
|
|
|
} |
|
|
|
if (len == sizeof(command)-1) { // command buffer full
|
|
|
|
command[sizeof(command)-1] = '\r'; |
|
|
|
command[sizeof(command)-2] = '\r'; // force-complete the line ([len-1] is tested below; [sizeof-1] would clobber the NUL and never match)
|
|
|
|
} |
|
|
|
|
|
|
|
if (len > 0 && command[len - 1] == '\r') { // received complete line
|
|
|
|
|
|
|
|
@ -535,7 +535,7 @@ public: |
|
|
|
Serial.print(c); |
|
|
|
} |
|
|
|
if (len == sizeof(command)-1) { // command buffer full
|
|
|
|
command[sizeof(command)-1] = '\r'; |
|
|
|
command[sizeof(command)-2] = '\r'; // force-complete the line ([len-1] is tested below; [sizeof-1] would clobber the NUL and never match)
|
|
|
|
} |
|
|
|
|
|
|
|
if (len > 0 && command[len - 1] == '\r') { // received complete line
|
|
|
|
|
|
|
|
@ -131,7 +131,7 @@ void loop() { |
|
|
|
Serial.print(c); |
|
|
|
} |
|
|
|
if (len == sizeof(command)-1) { // command buffer full
|
|
|
|
command[sizeof(command)-1] = '\r'; |
|
|
|
command[sizeof(command)-2] = '\r'; // force-complete the line ([len-1] is tested below; [sizeof-1] would clobber the NUL and never match)
|
|
|
|
} |
|
|
|
|
|
|
|
if (len > 0 && command[len - 1] == '\r') { // received complete line
|
|
|
|
|