Modifications to fix some networking/endian issues on PPC OSX.

* added sockaddr_clear() function to zero network addresses before use.
* used this function in p3connmgr.
* added htonll() and ntohll() functions to rsnet.h with compile-time ENDIAN checking
* use htonll() and ntohll() in serialiser.
* added net_test.cc to check network/endian/inet_addr issues.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@328 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-02-03 12:07:59 +00:00
parent cea158b77d
commit 31136da7cc
10 changed files with 374 additions and 40 deletions

View file

@ -106,9 +106,7 @@ pqissl::pqissl(pqissllistener *l, PQInterface *parent, p3AuthMgr *am, p3ConnectM
{
/* set address to zero */
remote_addr.sin_addr.s_addr = 0;
remote_addr.sin_port = 0;
remote_addr.sin_family = AF_INET;
sockaddr_clear(&remote_addr);
{
std::ostringstream out;