52 |
use gnump3d::base64; # For decoding passwords. |
use gnump3d::base64; # For decoding passwords. |
53 |
use gnump3d::config; # My configuration file reading module. |
use gnump3d::config; # My configuration file reading module. |
54 |
use gnump3d::files; # My routines for working with files and dirs. |
use gnump3d::files; # My routines for working with files and dirs. |
55 |
|
use gnump3d::lang::lookup; # Multilingual text translations. |
56 |
use gnump3d::playlist; # My playlist generating code. |
use gnump3d::playlist; # My playlist generating code. |
57 |
use gnump3d::tagcache; # Access to the tag cache. |
use gnump3d::tagcache; # Access to the tag cache. |
58 |
use gnump3d::IP; # Local copy of NetAddr::IP. |
use gnump3d::IP; # Local copy of NetAddr::IP. |
79 |
# |
# |
80 |
# |
# |
81 |
my $ROOT; # The root of the MP3 archive. |
my $ROOT; # The root of the MP3 archive. |
82 |
my $PORT; # The port the server listens upon. |
our $PORT; # The port the server listens upon. |
83 |
my $bind_address; # The address to bind upon. |
my $bind_address; # The address to bind upon. |
84 |
my $host; # The hostname of the local machine. |
my $host; # The hostname of the local machine. |
85 |
my $theme_dir; # The directory from which theme files are read. |
my $theme_dir; # The directory from which theme files are read. |
190 |
|
|
191 |
|
|
192 |
# |
# |
193 |
|
# Always load the English text strings before anything else. |
194 |
|
# |
195 |
|
our $literals = gnump3d::lang::lookup->new(); |
196 |
|
$literals->loadLanguage( "en" ); |
197 |
|
|
198 |
|
|
199 |
|
|
200 |
|
# |
201 |
# Parse any arguments which might be present upon the command line. |
# Parse any arguments which might be present upon the command line. |
202 |
# |
# |
203 |
&parseArguments(); |
&parseArguments(); |
274 |
# |
# |
275 |
if ( ! defined( $main_socket ) ) |
if ( ! defined( $main_socket ) ) |
276 |
{ |
{ |
277 |
print " Couldn't create the listening socket for receiving incoming\n"; |
my $error = $literals->get( "ERROR_BIND" ); |
278 |
print "requests upon.\n"; |
|
279 |
print "\n"; |
print $error; |
|
print " Perhaps the port $PORT is already in use?\n"; |
|
|
print "\n"; |
|
|
print " This is the error message the system returned:\n\t$!\n"; |
|
280 |
exit; |
exit; |
281 |
} |
} |
282 |
|
|