mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 05:22:31 -04:00
fixed up hidden addresses and removed whitespace from onion address.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@7036 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
affdd49001
commit
d39c5c028a
3 changed files with 66 additions and 30 deletions
|
@ -391,12 +391,25 @@ bool p3PeerMgrIMPL::setHiddenDomainPort(const std::string &ssl_id, const std::st
|
|||
std::cerr << "p3PeerMgrIMPL::setHiddenDomainPort()";
|
||||
std::cerr << std::endl;
|
||||
|
||||
std::string domain = domain_addr;
|
||||
// trim whitespace!
|
||||
size_t pos = domain.find_last_not_of(" \t\n");
|
||||
if (std::string::npos != pos)
|
||||
{
|
||||
domain = domain.substr(0, pos + 1);
|
||||
}
|
||||
pos = domain.find_first_not_of(" \t\n");
|
||||
if (std::string::npos != pos)
|
||||
{
|
||||
domain = domain.substr(pos);
|
||||
}
|
||||
|
||||
IndicateConfigChanged(); /**** INDICATE MSG CONFIG CHANGED! *****/
|
||||
|
||||
if (ssl_id == AuthSSL::getAuthSSL()->OwnId())
|
||||
{
|
||||
mOwnState.hiddenNode = true;
|
||||
mOwnState.hiddenDomain = domain_addr;
|
||||
mOwnState.hiddenDomain = domain;
|
||||
mOwnState.hiddenPort = domain_port;
|
||||
std::cerr << "p3PeerMgrIMPL::setHiddenDomainPort() Set own State";
|
||||
std::cerr << std::endl;
|
||||
|
@ -413,7 +426,7 @@ bool p3PeerMgrIMPL::setHiddenDomainPort(const std::string &ssl_id, const std::st
|
|||
return false;
|
||||
}
|
||||
|
||||
it->second.hiddenDomain = domain_addr;
|
||||
it->second.hiddenDomain = domain;
|
||||
it->second.hiddenPort = domain_port;
|
||||
it->second.hiddenNode = true;
|
||||
std::cerr << "p3PeerMgrIMPL::setHiddenDomainPort() Set Peers State";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue