| 872 | } |
| 873 | |
| 874 | bool parse_port(const ConfigPair& sample, NetworkAddress& retval, const NetworkAddress& value) |
| 875 | { |
| 876 | ACE_INET_Addr addr; |
| 877 | if (addr.set(sample.value().c_str()) == 0) { |
| 878 | retval = NetworkAddress(addr); |
| 879 | return true; |
| 880 | } else { |
| 881 | retval = value; |
| 882 | if (log_level >= LogLevel::Warning) { |
| 883 | ACE_ERROR((LM_WARNING, |
| 884 | ACE_TEXT("(%P|%t) WARNING: ConfigStoreImpl::get: ") |
| 885 | ACE_TEXT("failed to parse NetworkAddress for %C=%C\n"), |
| 886 | sample.key().c_str(), sample.value().c_str())); |
| 887 | } |
| 888 | } |
| 889 | return false; |
| 890 | } |
| 891 | |
| 892 | bool parse_optional_port(const ConfigPair& sample, NetworkAddress& retval, const NetworkAddress& value) |
| 893 | { |