charon-cmd: pass arguments to all handlers, even if already handled
This commit is contained in:
parent
9dfd9275f0
commit
7bcd96e43d
|
@ -254,6 +254,8 @@ static void handle_arguments(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
|
bool handled = FALSE;
|
||||||
|
|
||||||
opt = getopt_long(argc, argv, "", long_opts, NULL);
|
opt = getopt_long(argc, argv, "", long_opts, NULL);
|
||||||
switch (opt)
|
switch (opt)
|
||||||
{
|
{
|
||||||
|
@ -266,8 +268,9 @@ static void handle_arguments(int argc, char *argv[])
|
||||||
printf("%s, strongSwan %s\n", "charon-cmd", VERSION);
|
printf("%s, strongSwan %s\n", "charon-cmd", VERSION);
|
||||||
exit(0);
|
exit(0);
|
||||||
default:
|
default:
|
||||||
if (conn->handle(conn, opt, optarg) ||
|
handled |= conn->handle(conn, opt, optarg);
|
||||||
creds->handle(creds, opt, optarg))
|
handled |= creds->handle(creds, opt, optarg);
|
||||||
|
if (handled)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue