summaryrefslogtreecommitdiff
path: root/src/cli.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-04-06 16:20:20 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2015-04-06 16:20:20 +0200
commitf8b61244e3490003c1419447f5ec2232adc9a844 (patch)
tree8f2192cd0e0e5443c3aa5b71d892010917411cd0 /src/cli.c
parent4b77a582d891874e10c0c6b5fb1313c09409cbef (diff)
downloadbiruda-f8b61244e3490003c1419447f5ec2232adc9a844.tar.gz
biruda-f8b61244e3490003c1419447f5ec2232adc9a844.tar.bz2
CLI can take host and port parameter as arguments now
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cli.c b/src/cli.c
index f882c3b..194abd1 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -1,7 +1,7 @@
#include "cli.h"
#ifdef _WIN32
-int start_interactive( bool colors, FILE *in )
+int start_interactive( bool colors, const char *host, unsigned short port, FILE *in )
{
fprintf( stderr, "ERROR: Not implemented on Windows!\n" );
return EXIT_FAILURE;
@@ -255,13 +255,13 @@ static void stop_worker( const char *worker_name )
}
}
-int start_interactive( bool colors, unsigned short port, FILE *in )
+int start_interactive( bool colors, const char *host, unsigned short port, FILE *in )
{
char history_filename[1024];
// for http_tidy, tell it where to issue requests to
- http_server = "localhost"; // server is hard-coded
- http_port = port; // port not
+ http_server = (char *)host;
+ http_port = port;
is_interactive = isatty( fileno( in ) );
print_colors = is_interactive ? colors : false;