Skip to content

Commit

Permalink
Fixes previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-vincent committed Aug 14, 2017
1 parent 3782f4e commit 09a2836
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 0 additions & 2 deletions apps/freelan/src/configuration_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@ po::options_description get_fscp_options()
("fscp.never_contact", po::value<std::vector<asiotap::ip_network_address> >()->multitoken()->zero_tokens()->default_value(std::vector<asiotap::ip_network_address>(), ""), "A network address to avoid when dynamically contacting hosts.")
("fscp.cipher_suite_capability", po::value<std::vector<fscp::cipher_suite_type> >()->multitoken()->zero_tokens()->default_value(fscp::get_default_cipher_suites(), ""), "A cipher suite to allow.")
("fscp.elliptic_curve_capability", po::value<std::vector<fscp::elliptic_curve_type> >()->multitoken()->zero_tokens()->default_value(fscp::get_default_elliptic_curves(), ""), "A elliptic curve to allow.")
#ifdef USE_UPNP
("fscp.upnp_enabled", po::value<bool>()->default_value(true, "yes"), "Enable UPnP.")
#endif
;

return result;
Expand Down
19 changes: 13 additions & 6 deletions apps/freelan/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,24 @@ bool parse_options(fscp::logger& logger, int argc, char** argv, cli_configuratio
all_options.add(generic_options);

po::options_description configuration_options("Configuration");
#ifdef USE_MONGOOSE
configuration_options.add(get_server_options());
#endif
configuration_options.add(get_client_options());
po::options_description configuration_visible_options("Configuration");

configuration_options.add(get_fscp_options());
configuration_options.add(get_security_options());
configuration_options.add(get_tap_adapter_options());
configuration_options.add(get_switch_options());
configuration_options.add(get_router_options());
configuration_options.add(get_client_options());

configuration_visible_options.add(configuration_options);

// do not show webserver option to user if mongoose is not compiled
#ifdef USE_MONGOOSE
configuration_visible_options.add(get_server_options());
#endif
configuration_options.add(get_server_options());

visible_options.add(configuration_options);
visible_options.add(configuration_visible_options);
all_options.add(configuration_options);

#ifdef WINDOWS
Expand Down Expand Up @@ -406,7 +413,7 @@ bool parse_options(fscp::logger& logger, int argc, char** argv, cli_configuratio

for (auto&& conf : configuration_files)
{
logger(fscp::log_level::warning) << "- " << conf;
logger(fscp::log_level::warning) << "- " << conf;
}
}
}
Expand Down

0 comments on commit 09a2836

Please sign in to comment.