From bcf24d5fc9fdb9d59ae5aeb09b960401948c06b6 Mon Sep 17 00:00:00 2001 From: simon <> Date: Fri, 10 Oct 1997 22:23:48 +0000 Subject: [PATCH] port specified on command line. --- gild.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gild.c b/gild.c index 66336db..3faa677 100644 --- a/gild.c +++ b/gild.c @@ -61,6 +61,10 @@ int main( int argc, char * argv[]) arg ++; configPath = argv[ arg]; break; + case 'p': /* specify a port to listen on */ + arg ++; + port = atoi( argv[ arg]); + break; default: sprintf( errorBuff, "unrecognised command line switch [-%c]", @@ -80,11 +84,6 @@ int main( int argc, char * argv[]) error( FATAL_ERROR); } - port = handlers->port; /* for now we'll listen on the port of - the last registered handler -- - after all, we bomb out if this is - different from any of the others */ - keyhole = socket( AF_INET, SOCK_STREAM, 0); if ( keyhole == -1) {