mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[diags] use temporary buffer for diag output (#2992)
This commit is contained in:
+5
-1
@@ -3466,8 +3466,12 @@ exit:
|
||||
#if OPENTHREAD_ENABLE_DIAG
|
||||
void Interpreter::ProcessDiag(int argc, char *argv[])
|
||||
{
|
||||
char output[OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE];
|
||||
|
||||
// all diagnostics related features are processed within diagnostics module
|
||||
mServer->OutputFormat("%s\r\n", otDiagProcessCmd(argc, argv));
|
||||
output[sizeof(output) - 1] = '\0';
|
||||
otDiagProcessCmd(argc, argv, output, sizeof(output) - 1);
|
||||
mServer->OutputFormat("%s\n", output);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user