diff options
author | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2013-01-11 13:44:56 +0100 |
---|---|---|
committer | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2013-01-11 13:44:56 +0100 |
commit | 9c6a8fd84ff7dddf01d5e1b33a6a6d935816795b (patch) | |
tree | c8e82992d602cf55d2246fca869fc2628cfeea58 | |
parent | b31a2824a5a2abfd8b7dc68fec2d266dd5f943d7 (diff) | |
download | MAC-Telnet-9c6a8fd84ff7dddf01d5e1b33a6a6d935816795b.tar.gz MAC-Telnet-9c6a8fd84ff7dddf01d5e1b33a6a6d935816795b.zip |
Fixed a bug requiring -t to be used before -l
-rw-r--r-- | mactelnet.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mactelnet.c b/mactelnet.c index 0006f07..51d9df1 100644 --- a/mactelnet.c +++ b/mactelnet.c @@ -69,6 +69,7 @@ static struct in_addr destip; static int sourceport; static int connect_timeout = CONNECT_TIMEOUT; +static char run_mndp = 0; static int mndp_timeout = 0; static int is_a_tty = 1; @@ -485,7 +486,7 @@ int main (int argc, char **argv) { break; case 'l': - return mndp(mndp_timeout); + run_mndp = 1; break; case 'h': @@ -495,6 +496,9 @@ int main (int argc, char **argv) { } } + if (run_mndp) { + return mndp(mndp_timeout); + } if (argc - optind < 1 || print_help) { print_version(); fprintf(stderr, _("Usage: %s <MAC|identity> [-h] [-n] [-t <timeout>] [-u <user>] [-p <password>] [-U <user>] | -l\n"), argv[0]); |