Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 5a9d4945 authored by echicken's avatar echicken 🐔

Added cmdline arg -a (address) so that I can pass a comma

separated list of interfaces to bind to.
parent d094bea2
......@@ -149,6 +149,7 @@ var new_socket_send;
// Parse command-line arguments.
config_filename="";
var cmdline_port;
var cmdline_addr;
for (cmdarg=0;cmdarg<argc;cmdarg++) {
switch(argv[cmdarg].toLowerCase()) {
case "-f":
......@@ -160,6 +161,9 @@ for (cmdarg=0;cmdarg<argc;cmdarg++) {
case "-d":
debug=true;
break;
case "-a":
cmdline_addr = argv[++cmdarg].split(',');
break;
}
}
......@@ -174,7 +178,7 @@ if(this.server==undefined) { // Running from JSexec?
default_port = mline_port;
server = { socket: false, terminated: false,
version_detail: jsexec_revision_detail, interface_ip_addr_list: ["0.0.0.0","::"] };
version_detail: jsexec_revision_detail, interface_ip_addr_list: (cmdline_addr || ["0.0.0.0","::"]) };
server.socket = create_new_socket(default_port)
if (!server.socket)
exit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment