mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
- The settings in the settings window are only loaded once.
- Saving the settings without changing the network settings doesn't shutdown the connections git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2786 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
78644a2441
commit
38e06135a4
2 changed files with 26 additions and 20 deletions
|
@ -2603,24 +2603,27 @@ bool p3ConnectMgr::setLocalAddress(std::string id, struct sockaddr_in addr)
|
|||
|
||||
if (id == AuthSSL::getAuthSSL()->OwnId())
|
||||
{
|
||||
if (ownState.currentlocaladdr.sin_addr.s_addr != addr.sin_addr.s_addr ||
|
||||
ownState.currentlocaladdr.sin_port != addr.sin_port) {
|
||||
{
|
||||
RsStackMutex stack(connMtx); /****** STACK LOCK MUTEX *******/
|
||||
ownState.currentlocaladdr = addr;
|
||||
//avoid 0 for port and address
|
||||
if (ownState.currentlocaladdr.sin_addr.s_addr == 0) {
|
||||
ownState.currentlocaladdr.sin_addr.s_addr = 1;
|
||||
}
|
||||
if (addr.sin_port == 0) {
|
||||
ownState.currentlocaladdr.sin_port = 1;
|
||||
}
|
||||
RsStackMutex stack(connMtx); /****** STACK LOCK MUTEX *******/
|
||||
ownState.currentlocaladdr = addr;
|
||||
//avoid 0 for port and address
|
||||
if (ownState.currentlocaladdr.sin_addr.s_addr == 0) {
|
||||
ownState.currentlocaladdr.sin_addr.s_addr = 1;
|
||||
}
|
||||
if (addr.sin_port == 0) {
|
||||
ownState.currentlocaladdr.sin_port = 1;
|
||||
}
|
||||
}
|
||||
IndicateConfigChanged(); /**** INDICATE MSG CONFIG CHANGED! *****/
|
||||
if ((ownState.netMode & RS_NET_MODE_ACTUAL) == RS_NET_MODE_EXT ||
|
||||
(ownState.netMode & RS_NET_MODE_ACTUAL) == RS_NET_MODE_UDP) {
|
||||
netReset();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
RsStackMutex stack(connMtx); /****** STACK LOCK MUTEX *******/
|
||||
/* check if it is a friend */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue