1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-16 07:23:07 +01:00

correctly handle pass and sizes

This commit is contained in:
wellenvogel
2022-11-15 23:33:49 +01:00
parent 86139fc445
commit c02be797db
5 changed files with 20 additions and 90 deletions

View File

@@ -21,6 +21,7 @@ void GwLog::logString(const char *fmt,...){
va_list args;
va_start(args,fmt);
xSemaphoreTake(locker, portMAX_DELAY);
recordCounter++;
vsnprintf(buffer,bufferSize-1,fmt,args);
buffer[bufferSize-1]=0;
if (! writer) {
@@ -40,6 +41,7 @@ void GwLog::logDebug(int level,const char *fmt,...){
va_list args;
va_start(args,fmt);
xSemaphoreTake(locker, portMAX_DELAY);
recordCounter++;
vsnprintf(buffer,bufferSize-1,fmt,args);
buffer[bufferSize-1]=0;
if (! writer) {