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) {