Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
-our @EXPORT_OK = qw(GenerateMonitoredFiles DetectIPProtocolVersion FilePositions);
+our @EXPORT_OK = qw(GenerateMonitoredFiles GetFileposition DetectIPProtocolVersion FilePositions);
$new_file_positions{$file} = $current_file_positions{$file};
} else {
# Call function to obtain the file position.
$new_file_positions{$file} = $current_file_positions{$file};
} else {
# Call function to obtain the file position.
- my $position = &_initFileposition($file);
+ my $position = &GetFileposition($file);
# Add filename and position to the temporary hash.
$new_file_positions{$file} = $position;
# Add filename and position to the temporary hash.
$new_file_positions{$file} = $position;
-## Function for fileposition initialization.
+## Function to get the current (EOF) cursor postion.
#
## This function is used to get the cursor position of the end of file (EOF) of
## a specified file.
#
## This function is used to get the cursor position of the end of file (EOF) of
## a specified file.
## with huge logfiles, at initialization time of the worker processes, the file will
## be opened once and the cursor position of the end of file (EOF) get stored.
#
## with huge logfiles, at initialization time of the worker processes, the file will
## be opened once and the cursor position of the end of file (EOF) get stored.
#
-sub _initFileposition ($) {
+sub GetFileposition ($) {
my $file = $_[0];
# Open the file.
my $file = $_[0];
# Open the file.