Skip to content

Commit 91deea1

Browse files
authored
Merge pull request #714 from averater/fix_DisableNetwork_logspam
Remove DisableNetwork logspam
2 parents 880b98b + f6f4e6d commit 91deea1

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/daemon/dlt_daemon_offline_logstorage.c

+10-6
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ int dlt_daemon_logstorage_write(DltDaemon *daemon,
10201020
unsigned char *data3,
10211021
int size3)
10221022
{
1023+
static bool disable_nw_warning_sent = false;
10231024
int i = 0;
10241025
int ret = 0;
10251026
DltLogStorageUserConfig file_config;
@@ -1064,14 +1065,17 @@ int dlt_daemon_logstorage_write(DltDaemon *daemon,
10641065
&(daemon->storage_handle[i]),
10651066
DLT_LOGSTORAGE_SYNC_ON_DEVICE_DISCONNECT);
10661067
}
1067-
if (i == 0) {
1068-
if (disable_nw == 1) {
1068+
if (disable_nw == 1) {
1069+
if (i == 0) {
10691070
ret = 1;
10701071
}
1071-
} else {
1072-
dlt_vlog(LOG_WARNING,
1073-
"%s: DisableNetwork is not supported for more than one device yet\n",
1074-
__func__);
1072+
else if (disable_nw_warning_sent == false) {
1073+
disable_nw_warning_sent = true;
1074+
dlt_vlog(LOG_WARNING,
1075+
"%s: DisableNetwork is not supported for more "
1076+
"than one device yet\n",
1077+
__func__);
1078+
}
10751079
}
10761080
}
10771081
}

0 commit comments

Comments
 (0)