...
This commit is contained in:
@@ -15,7 +15,7 @@ int main(int argc, char* argv[])
|
||||
options.add_options()("h,help", "Print usage");
|
||||
options.add_options()(
|
||||
"endpoints", "endpoints server will be listening for",
|
||||
cxxopts::value<std::vector<std::string>>()->default_value("local://stream/tmp/ADC_ASIO_TEST_SERVER"));
|
||||
cxxopts::value<std::vector<std::string>>()->default_value("local://stream/@ADC_ASIO_TEST_SERVER"));
|
||||
|
||||
options.parse_positional({"endpoints"});
|
||||
|
||||
@@ -37,11 +37,10 @@ int main(int argc, char* argv[])
|
||||
adc::AdcEndpointParser epn(ep);
|
||||
if (epn.isValid()) {
|
||||
if (epn.isLocalSeqpacket() || epn.isLocalStream()) {
|
||||
if (opt_result["abstract"].as<bool>()) {
|
||||
auto s = epn.path<std::span<char>>();
|
||||
if (s[0] == '@') { // replace '@' to '\0' (use of UNIX abstract namespace)
|
||||
s[0] = '\0';
|
||||
}
|
||||
if (epn.path()[0] == '@') { // replace '@' to '\0' (use of UNIX abstract namespace)
|
||||
auto it = std::ranges::find(ep, '@');
|
||||
*it = '\0';
|
||||
epn = adc::AdcEndpointParser(ep);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user