Skip to content

Commit

Permalink
Merge pull request #714 from averater/fix_DisableNetwork_logspam
Browse files Browse the repository at this point in the history
Remove DisableNetwork logspam
  • Loading branch information
lti9hc authored Jan 8, 2025
2 parents 880b98b + f6f4e6d commit 91deea1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/daemon/dlt_daemon_offline_logstorage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,7 @@ int dlt_daemon_logstorage_write(DltDaemon *daemon,
unsigned char *data3,
int size3)
{
static bool disable_nw_warning_sent = false;
int i = 0;
int ret = 0;
DltLogStorageUserConfig file_config;
Expand Down Expand Up @@ -1064,14 +1065,17 @@ int dlt_daemon_logstorage_write(DltDaemon *daemon,
&(daemon->storage_handle[i]),
DLT_LOGSTORAGE_SYNC_ON_DEVICE_DISCONNECT);
}
if (i == 0) {
if (disable_nw == 1) {
if (disable_nw == 1) {
if (i == 0) {
ret = 1;
}
} else {
dlt_vlog(LOG_WARNING,
"%s: DisableNetwork is not supported for more than one device yet\n",
__func__);
else if (disable_nw_warning_sent == false) {
disable_nw_warning_sent = true;
dlt_vlog(LOG_WARNING,
"%s: DisableNetwork is not supported for more "
"than one device yet\n",
__func__);
}
}
}
}
Expand Down

0 comments on commit 91deea1

Please sign in to comment.