Skip to content

Commit

Permalink
Fix pigweedlogger assert. Wait until the previous send has completed/…
Browse files Browse the repository at this point in the history
…empty the buffer before verifing if we have enough space in the send buffer (#26093)
  • Loading branch information
jmartinez-silabs authored and pull[bot] committed Nov 30, 2023
1 parent 04f60d9 commit a3aee46
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/platform/silabs/PigweedLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ void init(void)

int putString(const char * buffer, size_t size)
{
assert(sWriteBufferPos < kWriteBufferSize);

xSemaphoreTake(sLoggerLock, portMAX_DELAY);
assert(sWriteBufferPos < kWriteBufferSize);

for (size_t i = 0; i < size; ++i)
{
Expand Down

0 comments on commit a3aee46

Please sign in to comment.