Commit 38c8b32f authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(server_init): New argument: host. Bind the specified IP number.

(initialize): Pass param.ip_client_host to server_init.
parent 9db764cc
/*
* $Id: ramkomd.c,v 0.79 1999/04/17 21:53:51 ceder Exp $
* $Id: ramkomd.c,v 0.80 1999/04/19 20:13:00 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -44,7 +44,7 @@
#endif
static const char *
rcsid = "$Id: ramkomd.c,v 0.79 1999/04/17 21:53:51 ceder Exp $";
rcsid = "$Id: ramkomd.c,v 0.80 1999/04/19 20:13:00 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -127,7 +127,7 @@ static void dump_exit_statistics(void);
static void free_kom_info(void);
static void
server_init (char * client_port, char * mux_port)
server_init(const char *host, const char * client_port, const char * mux_port)
{
IscConfig config;
IscAddress *isc_adr = NULL;
......@@ -156,7 +156,7 @@ server_init (char * client_port, char * mux_port)
if ( kom_server_mcb == NULL )
restart_kom("server_init: can't isc_initialize()\n");
listen_client = isc_listentcp(kom_server_mcb, NULL, client_port);
listen_client = isc_listentcp(kom_server_mcb, host, client_port);
if (listen_client == NULL)
restart_kom("server_init: can't isc_listentcp(CLIENT)\n");
......@@ -167,7 +167,7 @@ server_init (char * client_port, char * mux_port)
param.num_ip_client_port = isc_getportnum (isc_adr);
isc_freeaddress (isc_adr);
listen_mux = isc_listentcp (kom_server_mcb, NULL, mux_port);
listen_mux = isc_listentcp (kom_server_mcb, host, mux_port);
if (listen_mux == NULL)
restart_kom("server_init: can't isc_listentcp(MUX)\n");
......@@ -432,7 +432,7 @@ initialize(const char *config_file)
#endif
go_daemon();
server_init(param.ip_client_port, param.ip_mux_port);
server_init(param.ip_client_host, param.ip_client_port, param.ip_mux_port);
init_data_base();
}
......
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