MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / parse_optional_port

Function parse_optional_port

dds/DCPS/ConfigStoreImpl.cpp:892–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890 }
891
892 bool parse_optional_port(const ConfigPair& sample, NetworkAddress& retval, const NetworkAddress& value)
893 {
894 ACE_INET_Addr addr;
895 if (addr.set(sample.value().c_str()) == 0) {
896 retval = NetworkAddress(addr);
897 return true;
898 } else if (addr.set(u_short(0), sample.value().c_str()) == 0) {
899 retval = NetworkAddress(addr);
900 return true;
901 } else {
902 retval = value;
903 if (log_level >= LogLevel::Warning) {
904 ACE_ERROR((LM_WARNING,
905 ACE_TEXT("(%P|%t) WARNING: ConfigStoreImpl::get: ")
906 ACE_TEXT("failed to parse NetworkAddress for %C=%C\n"),
907 sample.key().c_str(), sample.value().c_str()));
908 }
909 }
910 return false;
911 }
912}
913
914NetworkAddress

Callers 1

getMethod · 0.85

Calls 3

setMethod · 0.45
valueMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected