diff options
author | Haru <haru@dotalux.com> | 2016-07-03 19:47:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-03 19:47:38 +0200 |
commit | d2f666fc10eac20f70729176c088b2c81d233531 (patch) | |
tree | 55902d4e252f365f511137d4022670ccfad59a62 /src/login/login.c | |
parent | 6fbc00f9454d33caf79f89708cab9e46ec996eeb (diff) | |
parent | 7b350fbf497d737c12cc03ddd888bb6a0ee486e4 (diff) | |
download | hercules-d2f666fc10eac20f70729176c088b2c81d233531.tar.gz hercules-d2f666fc10eac20f70729176c088b2c81d233531.tar.bz2 hercules-d2f666fc10eac20f70729176c088b2c81d233531.tar.xz hercules-d2f666fc10eac20f70729176c088b2c81d233531.zip |
Merge pull request #1336 from 4144/travisext
Different travis extensions
Diffstat (limited to 'src/login/login.c')
-rw-r--r-- | src/login/login.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/login/login.c b/src/login/login.c index d7c7321d8..49508d564 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1671,6 +1671,19 @@ static CMDLINEARG(loginconfig) login->LOGIN_CONF_NAME = aStrdup(params); return true; } + +/** + * --run-once handler + * + * Causes the server to run its loop once, and shutdown. Useful for testing. + * @see cmdline->exec + */ +static CMDLINEARG(runonce) +{ + core->runflag = CORE_ST_STOP; + return true; +} + /** * --net-config handler * @@ -1688,6 +1701,7 @@ static CMDLINEARG(netconfig) */ void cmdline_args_init_local(void) { + CMDLINEARG_DEF2(run-once, runonce, "Closes server after loading (testing).", CMDLINE_OPT_NORMAL); CMDLINEARG_DEF2(login-config, loginconfig, "Alternative login-server configuration.", CMDLINE_OPT_PARAM); CMDLINEARG_DEF2(net-config, netconfig, "Alternative subnet configuration.", CMDLINE_OPT_PARAM); } |