Преглед на файлове

fixed JSON output

tags/v1.1.0
root преди 5 години
родител
ревизия
d83007f46f
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2
    2
      src/dp_events.c

+ 2
- 2
src/dp_events.c Целия файл

@@ -84,7 +84,7 @@ void dp_events_stats(dp_conf *conf) {
fprintf(fh, "\"abs\": %llu }", stats4->abscnt[i]);
}

if ( ( stats4->relcnt[i]>0 || stats4->abscnt[i]>0 ) && i-1 != DP_DHCPV4_CODE_LEN )
if ( ( stats4->relcnt[i]>0 || stats4->abscnt[i]>0 ) && i+1 != DP_DHCPV4_CODE_LEN )
fprintf(fh, ", ");

stats4->relcnt[i]=0;
@@ -104,7 +104,7 @@ void dp_events_stats(dp_conf *conf) {
fprintf(fh, "\"abs\": %llu }", stats6->abscnt[i]);
}

if ( ( stats6->relcnt[i]>0 || stats6->abscnt[i]>0 ) && i-1 != DP_DHCPV6_CODE_LEN )
if ( ( stats6->relcnt[i]>0 || stats6->abscnt[i]>0 ) && i+1 != DP_DHCPV6_CODE_LEN )
fprintf(fh, ", ");

stats6->relcnt[i]=0;

Loading…
Отказ
Запис