Skip to content

Commit

Permalink
Fix #554 - code dump in new processing pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
phaag committed Aug 9, 2024
1 parent 493c542 commit 10d4666
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libnfdump/filter/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ static void InitFilter(void) {
void FilterSetParam(void *engine, const char *ident, const int hasGeoDB) {
FilterEngine_t *filterEngine = (FilterEngine_t *)engine;
filterEngine->hasGeoDB = hasGeoDB;
filterEngine->ident = ident;
filterEngine->ident = ident ? ident : "none";
} // End of FilterSetParam

void *FilterCloneEngine(void *engine) {
Expand Down
6 changes: 4 additions & 2 deletions src/nfdump/nfdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,10 @@ __attribute__((noreturn)) static void *prepareThread(void *arg) {

int done = nffile == NULL;
while (!done) {
if (dataHandle == NULL) dataHandle = calloc(1, sizeof(dataHandle_t));
if (dataHandle == NULL) {
dataHandle = calloc(1, sizeof(dataHandle_t));
dataHandle->ident = nffile->ident;
}
dataHandle->dataBlock = ReadBlock(nffile, NULL);

// get next data block from file
Expand All @@ -300,7 +303,6 @@ __attribute__((noreturn)) static void *prepareThread(void *arg) {
} else {
if (nffile->stat_record->firstseen < t_first_flow) t_first_flow = nffile->stat_record->firstseen;
if (nffile->stat_record->lastseen > t_last_flow) t_last_flow = nffile->stat_record->lastseen;
dataHandle->ident = nffile->ident;
}
continue;
}
Expand Down

0 comments on commit 10d4666

Please sign in to comment.