Ported branch commits:

3099: libretroshare/src/tcponudp/udplayer.cc 
      libretroshare/src/tcponudp/udplayer.h 	
      libretroshare/src/util/rsnet.cc 	
      libretroshare/src/util/rsnet.h

	moved operator<<(ostream&,sockaddr_in) to rsnet.h, as it is used at
	different places

3100: libretroshare/src/util/rsdiscspace.cc
	suppressed debug mode

3101: libretroshare/src/serialiser/rsdiscitems.cc

	put correct (i.e. non conservative) size for RsDiscReply packets

3102: libretroshare/src/services/p3disc.cc

	Made a pass on the code in p3disc. Corrected some bugs:
		- suppressed an unwanted return in packet treatment
		- prevented sending info to a peer about itself
		- changed askInfoToAllPeers() such as not to discard info
		  from peers with NODISC flag (because we especially need
		  info for these)
		- enabled receiving p3disc info even if p3discovery is
		  disabled. Indeed, disabeling p3disc is a measure of
		  protection, so it should limit the export of p3disc info,
		  not the import.
		- removed test discarding info about dummy friends, because
		  it is useless
		- don't discard info about peers that have the NODISC flag
		  (meaning that we especially need info for them)
		- added safety check about received GPG keys. Before we
		  relied on this test being performed by
		  p3ConnMgr::addFriend()
		- added some debug info

3103: libretroshare/src/ft/ftcontroller.cc
	removed debug info



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3104 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-06-10 13:42:49 +00:00
parent f22753a586
commit 0d14351b8a
8 changed files with 257 additions and 224 deletions

View file

@ -38,7 +38,6 @@
/*
* #define DEBUG_RSDISCSPACE
*/
#define DEBUG_RSDISCSPACE
time_t RsDiscSpace::_last_check[3] = { 0,0,0 } ;
uint32_t RsDiscSpace::_size_limit_mb = 100 ;

View file

@ -140,3 +140,11 @@ bool getIPAddressFromString (const char *addr_str, struct in_addr *addr)
return false;
}
std::ostream &operator<<(std::ostream &out, const struct sockaddr_in &addr)
{
out << "[" << inet_ntoa(addr.sin_addr) << ":";
out << htons(addr.sin_port) << "]";
return out;
}

View file

@ -29,6 +29,7 @@
#include <inttypes.h>
#include <stdlib.h> /* Included because GCC4.4 wants it */
#include <string.h> /* Included because GCC4.4 wants it */
#include <iostream>
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
#ifndef WINDOWS_SYS
@ -73,4 +74,6 @@ bool isExternalNet(const struct in_addr *addr);
/* convert addresses */
bool getIPAddressFromString (const char *addr_str, struct in_addr *addr);
std::ostream& operator<<(std::ostream& o,const struct sockaddr_in&) ;
#endif /* RS_UNIVERSAL_NETWORK_HEADER */