snort plugin: Split the snort_read() function.
authorFlorian Forster <octo@collectd.org>
Wed, 20 Feb 2013 08:14:15 +0000 (09:14 +0100)
committerFlorian Forster <octo@collectd.org>
Wed, 20 Feb 2013 08:14:15 +0000 (09:14 +0100)
commit53d05e8592dc3277c88df320c26302c24c918c5b
treebe301895b5cf8dfd8e244fced97bd9acd646c37c
parentc97c8756a28969fea924a80bfc42c989dcd20ced
snort plugin: Split the snort_read() function.

snort_read() handles the file opening / mmap part of the process.
snort_read_buffer() parses the buffer, splits the last line and calls
the submit function. This way cleaning up the FD and memory mapping is
easier in case of an error when parsing the file.
src/snort.c