Skip to content

Commit 1400011

Browse files
committed
Fix nfstat ptr offset
1 parent 0c9293d commit 1400011

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/nfdump/nfstat.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -603,14 +603,14 @@ void AddElementStat(recordHandle_t *recordHandle) {
603603
}
604604
}
605605

606+
inPtr += offset;
606607
preprocess_t lookup = StatParameters[index].preprocess;
607608
inPtr = PreProcess(inPtr, lookup, recordHandle);
608609
if (inPtr == NULL) {
609610
index++;
610611
continue;
611612
}
612613

613-
inPtr += offset;
614614
uint32_t length = StatParameters[index].element.length;
615615
switch (length) {
616616
case 0:

src/output/output_json.c

-7
Original file line numberDiff line numberDiff line change
@@ -800,13 +800,6 @@ static void flow_record_to_json(FILE *stream, recordHandle_t *recordHandle, int
800800
}
801801
}
802802

803-
// add label and close json object
804-
/* XXX
805-
fprintf(stream,
806-
" \"label\" : \"%s\"\n"
807-
r->label ? r->label : "<none>");
808-
*/
809-
810803
// Close out JSON record
811804
fprintf(stream, "%s\"sampled\" : %u%s}", indent, TestFlag(recordHeaderV3->flags, V3_FLAG_SAMPLED) ? 1 : 0, ws);
812805

0 commit comments

Comments
 (0)