port specified on command line.

This commit is contained in:
simon 1997-10-10 22:23:48 +00:00
parent a119a8552b
commit bcf24d5fc9

9
gild.c
View file

@ -61,6 +61,10 @@ int main( int argc, char * argv[])
arg ++; arg ++;
configPath = argv[ arg]; configPath = argv[ arg];
break; break;
case 'p': /* specify a port to listen on */
arg ++;
port = atoi( argv[ arg]);
break;
default: default:
sprintf( errorBuff, sprintf( errorBuff,
"unrecognised command line switch [-%c]", "unrecognised command line switch [-%c]",
@ -80,11 +84,6 @@ int main( int argc, char * argv[])
error( FATAL_ERROR); 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); keyhole = socket( AF_INET, SOCK_STREAM, 0);
if ( keyhole == -1) if ( keyhole == -1)
{ {