Merged Changes /branches/v0.5-peernet/libretroshare/:r4237-4358

Major changes are:
 * Improvements to tcponudp library to allow multiple UdpStacks / ports, with alternative recievers.
 * Resurrected the UdpStunner code, and improved it.
 * Added UdpRelay code.
 * Modified startup code and ssludp code to use the new tcponudp and add a stunner.
 * fixed buggy rs_inet_ntoa
 * fixed a bunch of apple gcc warnings. mainly for(;;); => for(;;) ;

These changes shouldn't affect libretroshare stability... those changes will follow!




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4359 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-06-29 18:02:44 +00:00
parent d58f838269
commit b683e663d6
19 changed files with 1679 additions and 151 deletions

View file

@ -1637,7 +1637,7 @@ bool p3DhtMgr::dhtResultNotify(std::string idhash)
time_t now = time(NULL);
/* if notify - we must match on the second hash */
for(it = peers.begin(); (it != peers.end()) && ((it->second).hash2 != idhash); it++);
for(it = peers.begin(); (it != peers.end()) && ((it->second).hash2 != idhash); it++) ;
/* update data */
std::string peerid;
@ -1697,7 +1697,7 @@ bool p3DhtMgr::dhtResultSearch(std::string idhash,
dhtPeerEntry ent;
/* if search - we must match on the second hash */
for(it = peers.begin(); (it != peers.end()) && ((it->second).hash1 != idhash); it++);
for(it = peers.begin(); (it != peers.end()) && ((it->second).hash1 != idhash); it++) ;
/* update data */
/* ignore OFF peers */

View file

@ -99,7 +99,9 @@ int pqissludp::reset()
int pqissludp::attach()
{
sockfd = tou_socket(0,0,0);
// IN THE IMPROVED TOU LIBRARY, we need to be careful with the tou_socket PARAMETERS.
// For now, this should do!
sockfd = tou_socket(0,TOU_RECEIVER_TYPE_UDPPEER,0);
if (0 > sockfd)
{
rslog(RSL_WARNING, pqissludpzone,

View file

@ -585,7 +585,9 @@ X509 *loadX509FromDER(const uint8_t *ptr, uint32_t len)
X509 *tmp = NULL;
#ifdef __APPLE__
// This depends on which version you are compiling for... OSX10.5 doesn't have consts (old OpenSSL!)
unsigned char **certptr = (unsigned char **) &ptr;
//const unsigned char **certptr = (const unsigned char **) &ptr;
#else
const unsigned char **certptr = (const unsigned char **) &ptr;
#endif