# HG changeset patch # User Heiko Schlittermann # Date 1262207736 -3600 # Node ID ba9f62859590741a8f662c91c11bb1d81800bd28 # Parent 64adfc60fca9207c3ff7702a1dd8e9e395d692d3 [cleanup]/abs_path Did some cosmetical cleanup (removed the commented SSL socket listener. Use abs_path() for finding the absolute path of a log file. diff -r 64adfc60fca9 -r ba9f62859590 hlog.pl --- a/hlog.pl Tue Dec 29 15:08:09 2009 +0100 +++ b/hlog.pl Wed Dec 30 22:15:36 2009 +0100 @@ -121,7 +121,7 @@ } foreach ($opt_ssl_key, $opt_ssl_cert) { - $_ = abs_path($_) if defined; + $_ = abs_path($_) if defined; } ### $opt_ssl_key @@ -172,36 +172,17 @@ # resolve tags and filenames foreach (@ARGV) { $_ = "default=$_" if not /=/ or /^\//; + my ($tag, $file) = split /=/, $_, 2; + die "tag $tag already exists with file $FILE{$tag}\n" if exists $FILE{$tag}; - $file = getcwd() . "/$file" if $file !~ /^\//; + $file = abs_path($file); $FILE{$tag} = $file; } - # start the listener - # my $listener = - # $opt_ssl - # ? new IO::Socket::SSL( - # LocalAddr => $opt_addr, - # LocalPort => $opt_port, - # Proto => "tcp", - # Listen => 1, - # ReuseAddr => 1, - # SSL => $opt_ssl, - # SSL_key_file => $opt_ssl_key, - # SSL_cert_file => $opt_ssl_cert, - # #debug => $opt_debug - # ) - # : new IO::Socket::INET( - # LocalAddr => $opt_addr, - # LocalPort => $opt_port, - # Proto => "tcp", - # Listen => 1, - # ReuseAddr => 1, - # #debug => $opt_debug, - # ); - + # Start the listener, just a normal INET socket, + # SSL will be started later on, if needed.. my $listener = new IO::Socket::INET( LocalAddr => $opt_addr, LocalPort => $opt_port,