little-big endian issue failed before

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/networking@13127 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hilnius 2013-07-08 16:02:08 +00:00
parent 39436d464c
commit 136b9d2b15

View File

@ -65,10 +65,10 @@ void GetPeerAddress::update()
uint32_t reversed_ip;
result->get("ip", &reversed_ip);
result->get("port", &addr->port);
addr->ip = (((reversed_ip<<24)&0xff))
+( ((reversed_ip<<16)&0xff)>>8)
+( ((reversed_ip<<8)&0xff)>>16)
+( ((reversed_ip<<0)&0xff)>>24);
addr->ip = ((reversed_ip&0xff000000) >> 24)
+((reversed_ip&0x00ff0000) >> 8)
+((reversed_ip&0x0000ff00) << 8)
+((reversed_ip&0x000000ff) << 24);
Log::info("GetPeerAddress", "Address gotten successfully.");
}
else