Skip to content

Commit

Permalink
Fix nfstat ptr offset
Browse files Browse the repository at this point in the history
  • Loading branch information
phaag committed Apr 6, 2024
1 parent 0c9293d commit 1400011
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion src/nfdump/nfstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,14 +603,14 @@ void AddElementStat(recordHandle_t *recordHandle) {
}
}

inPtr += offset;
preprocess_t lookup = StatParameters[index].preprocess;
inPtr = PreProcess(inPtr, lookup, recordHandle);
if (inPtr == NULL) {
index++;
continue;
}

inPtr += offset;
uint32_t length = StatParameters[index].element.length;
switch (length) {
case 0:
Expand Down
7 changes: 0 additions & 7 deletions src/output/output_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,13 +800,6 @@ static void flow_record_to_json(FILE *stream, recordHandle_t *recordHandle, int
}
}

// add label and close json object
/* XXX
fprintf(stream,
" \"label\" : \"%s\"\n"
r->label ? r->label : "<none>");
*/

// Close out JSON record
fprintf(stream, "%s\"sampled\" : %u%s}", indent, TestFlag(recordHeaderV3->flags, V3_FLAG_SAMPLED) ? 1 : 0, ws);

Expand Down

0 comments on commit 1400011

Please sign in to comment.