port specified on command line.
This commit is contained in:
parent
a119a8552b
commit
bcf24d5fc9
9
gild.c
9
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue