Fix ames port logic

Hey, we have a -p flag. Neat.
This commit is contained in:
Steve Dee 2014-01-15 11:21:50 -08:00
parent e434374855
commit 4605ac9c66
2 changed files with 3 additions and 4 deletions

View File

@ -281,7 +281,7 @@ u2_ames_io_init()
srand(time(0)); // don't panic, only for fuzz testing
por_s = u2_Host.ops_u.por_s;
por_s = 0;
if ( 0 != u2_Host.ops_u.imp_c ) {
u2_noun imp = u2_ci_string(u2_Host.ops_u.imp_c);
u2_noun num = u2_dc("slaw", 'p', imp);
@ -311,8 +311,7 @@ u2_ames_io_init()
memset(&add_u, 0, sizeof(add_u));
add_u.sin_family = AF_INET;
add_u.sin_addr.s_addr = htonl(INADDR_ANY);
//add_u.sin_port = htons(59009);
add_u.sin_port = htons(por_s);
add_u.sin_port = htons(u2_Host.ops_u.por_s);
if ( uv_udp_bind(&sam_u->wax_u, add_u, 0) != 0 ) {
uL(fprintf(uH, "ames: bind: %s\n",

View File

@ -55,7 +55,7 @@ _main_getopt(c3_i argc, c3_c** argv)
u2_Host.ops_u.vno = u2_no;
u2_Host.ops_u.kno_w = DefaultKernel;
u2_Host.ops_u.fuz_w = 0;
u2_Host.ops_u.por_s = 0;
u2_Host.ops_u.por_s = 59009;
while ( (ch_i = getopt(argc, argv, "k:f:h:I:p:Lcdsagqv")) != -1 ) {
switch ( ch_i ) {