mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-08-03 10:16:03 -04:00
Merge pull request #1151 from kiwix/feature/fix-server-set-addr
Fix Server::setAddress
This commit is contained in:
commit
585f55d885
@ -75,9 +75,11 @@ void Server::setRoot(const std::string& root)
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: this method is implemented under the assumption that it is invoked only once (per object).
|
||||
void Server::setAddress(const std::string& addr)
|
||||
{
|
||||
m_addr.addr.clear();
|
||||
m_addr.addr6.clear();
|
||||
|
||||
if (addr.empty()) return;
|
||||
|
||||
if (addr.find(':') != std::string::npos) { // IPv6
|
||||
|
Loading…
x
Reference in New Issue
Block a user