MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / SetAlias

Method SetAlias

src/common/cmdargparser.cpp:406–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404
405
406void SingleCommandOption::SetAlias(const std::string &optalias)
407{
408 if (!alias.empty())
409 {
410 throw CommandException(alias, "Alias already registered");
411 }
412
413 alias = optalias;
414
415 // Initialise a separate struct option for the alias
416 getopt_alias.name = strdup(alias.c_str());
417 getopt_alias.flag = NULL;
418 getopt_alias.has_arg = getopt_option.has_arg;
419 getopt_alias.val = 0;
420}
421
422
423std::string SingleCommandOption::get_option_list_prefixed()

Calls 2

CommandExceptionClass · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected