diff --git a/src/nfsen/Makefile.am b/src/nfsen/Makefile.am index 7bd98a6e..f4d534ef 100755 --- a/src/nfsen/Makefile.am +++ b/src/nfsen/Makefile.am @@ -12,9 +12,8 @@ bin_PROGRAMS += nftrack endif nfstatfile = ../collector/nfstatfile.c ../collector/nfstatfile.h -exporter = ../nfdump/exporter.c -nfprofile_SOURCES = nfprofile.c profile.c profile.h $(nfstatfile) $(exporter) +nfprofile_SOURCES = nfprofile.c profile.c profile.h $(nfstatfile) nfprofile_LDADD = -lnfdump -lnffile -lrrd nfprofile_LDFLAGS = -L../libnfdump -L../libnffile diff --git a/src/nfsen/nfprofile.c b/src/nfsen/nfprofile.c index 0b688225..c0e3d5a2 100644 --- a/src/nfsen/nfprofile.c +++ b/src/nfsen/nfprofile.c @@ -44,7 +44,6 @@ #include #include "conf/nfconf.h" -#include "exporter.h" #include "filter/filter.h" #include "flist.h" #include "nbar.h" @@ -185,34 +184,20 @@ static void process_data(profile_channel_info_t *channels, unsigned int num_chan break; case ExporterInfoRecordType: { - int err = AddExporterInfo((exporter_info_record_t *)record_ptr); - if (err != 0) { - for (int j = 0; j < num_channels; j++) { - if (channels[j].nffile != NULL && err == 1) { - // flush new exporter - channels[j].dataBlock = - AppendToBuffer(channels[j].nffile, channels[j].dataBlock, (void *)record_ptr, record_ptr->size); - } + for (int j = 0; j < num_channels; j++) { + if (channels[j].nffile != NULL) { + // flush new exporter + channels[j].dataBlock = AppendToBuffer(channels[j].nffile, channels[j].dataBlock, (void *)record_ptr, record_ptr->size); } - } else { - LogError("Failed to add Exporter Record"); } } break; - case SamplerLegacyRecordType: { - if (AddSamplerLegacyRecord((samplerV0_record_t *)record_ptr) == 0) LogError("Failed to add legacy Sampler Record\n"); - } break; + case SamplerLegacyRecordType: case SamplerRecordType: { - int err = AddSamplerRecord((sampler_record_t *)record_ptr); - if (err != 0) { - for (int j = 0; j < num_channels; j++) { - if (channels[j].nffile != NULL && err == 1) { - // flush new map - channels[j].dataBlock = - AppendToBuffer(channels[j].nffile, channels[j].dataBlock, (void *)record_ptr, record_ptr->size); - } + for (int j = 0; j < num_channels; j++) { + if (channels[j].nffile != NULL) { + // flush new map + channels[j].dataBlock = AppendToBuffer(channels[j].nffile, channels[j].dataBlock, (void *)record_ptr, record_ptr->size); } - } else { - LogError("Failed to add Sampler Record"); } } break; case NbarRecordType: @@ -618,10 +603,6 @@ int main(int argc, char **argv) { exit(255); } - if (!InitExporterList()) { - exit(255); - } - queue_t *fileList = SetupInputFileSequence(&flist); if (!fileList || !Init_nffile(DEFAULTWORKERS, fileList)) exit(254);