mirror of
https://github.com/urbit/shrub.git
synced 2024-12-11 11:02:25 +03:00
conn: add --no-conn option
Might be handy on Windows in case of running multiple fakezods.
This commit is contained in:
parent
b1392f0f72
commit
654ff1f4cb
@ -153,6 +153,7 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
{ "ames-port", required_argument, NULL, 'p' },
|
||||
{ "http-port", required_argument, NULL, c3__http },
|
||||
{ "https-port", required_argument, NULL, c3__htls },
|
||||
{ "no-conn", no_argument, NULL, c3__noco },
|
||||
{ "quiet", no_argument, NULL, 'q' },
|
||||
{ "versions", no_argument, NULL, 'R' },
|
||||
{ "replay-from", required_argument, NULL, 'r' },
|
||||
@ -274,6 +275,10 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
} else u3_Host.ops_u.pes_s = arg_w;
|
||||
break;
|
||||
}
|
||||
case c3__noco: {
|
||||
u3_Host.ops_u.con = c3n;
|
||||
break;
|
||||
}
|
||||
case 'R': {
|
||||
u3_Host.ops_u.rep = c3y;
|
||||
return c3y;
|
||||
@ -564,6 +569,7 @@ u3_ve_usage(c3_i argc, c3_c** argv)
|
||||
"-x, --exit Exit immediately\n",
|
||||
"-Y, --scry-into FILE Optional name of file (for -X)\n",
|
||||
"-Z, --scry-format FORMAT Optional file format ('jam', or aura, for -X)\n",
|
||||
" --no-conn Do not run control plane\n",
|
||||
"\n",
|
||||
"Development Usage:\n",
|
||||
" To create a development ship, use a fakezod:\n",
|
||||
|
@ -794,6 +794,7 @@
|
||||
# define c3__no c3_s2('n','o')
|
||||
# define c3__noah c3_s4('n','o','a','h')
|
||||
# define c3__nock c3_s4('n','o','c','k')
|
||||
# define c3__noco c3_s4('n','o','c','o')
|
||||
# define c3__none c3_s4('n','o','n','e')
|
||||
# define c3__noop c3_s4('n','o','o','p')
|
||||
# define c3__nop c3_s3('n','o','p')
|
||||
|
@ -309,6 +309,7 @@
|
||||
c3_o tex; // -x, exit after loading
|
||||
c3_c* puk_c; // -Y, scry result filename
|
||||
c3_c* puf_c; // -Z, scry result format
|
||||
c3_o con; // run conn
|
||||
} u3_opts;
|
||||
|
||||
/* u3_host: entire host.
|
||||
|
@ -894,26 +894,27 @@ _conn_io_exit(u3_auto* car_u)
|
||||
u3_auto*
|
||||
u3_conn_io_init(u3_pier* pir_u)
|
||||
{
|
||||
u3_conn* con_u = c3_calloc(sizeof(*con_u));
|
||||
u3_auto* car_u = &con_u->car_u;
|
||||
u3_conn* con_u;
|
||||
u3_auto* car_u;
|
||||
u3_noun now;
|
||||
struct timeval tim_u;
|
||||
|
||||
if ( c3n == u3_Host.ops_u.con ) {
|
||||
return NULL;
|
||||
}
|
||||
con_u = c3_calloc(sizeof(*con_u));
|
||||
con_u->sil_u = u3s_cue_xeno_init();
|
||||
con_u->kan_o = c3n;
|
||||
car_u = &con_u->car_u;
|
||||
car_u->nam_m = c3__conn;
|
||||
car_u->liv_o = c3n;
|
||||
car_u->io.talk_f = _conn_io_talk;
|
||||
car_u->io.kick_f = _conn_io_kick;
|
||||
car_u->io.exit_f = _conn_io_exit;
|
||||
|
||||
{
|
||||
u3_noun now;
|
||||
struct timeval tim_u;
|
||||
|
||||
gettimeofday(&tim_u, 0);
|
||||
now = u3_time_in_tv(&tim_u);
|
||||
con_u->sev_l = u3r_mug(now);
|
||||
u3z(now);
|
||||
}
|
||||
|
||||
gettimeofday(&tim_u, 0);
|
||||
now = u3_time_in_tv(&tim_u);
|
||||
con_u->sev_l = u3r_mug(now);
|
||||
u3z(now);
|
||||
return car_u;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user