Ported trunk commits:

2781: 
		- fix a gui bug
	2786: 
		- The settings in the settings window are only loaded once.
		- Saving the settings without changing the network settings doesn't
		  shutdown the connections
	6788:
		- Forwarding a message keep the attached recommended files.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5.0@2803 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-04-27 19:07:00 +00:00
parent 502e006352
commit ed73533862
7 changed files with 89 additions and 44 deletions

View file

@ -2535,24 +2535,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 */