little-big endian issue
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/networking@13126 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
ac6534615c
commit
39436d464c
@ -62,8 +62,13 @@ void GetPeerAddress::update()
|
||||
if (rec_success == "yes")
|
||||
{
|
||||
TransportAddress* addr = static_cast<TransportAddress*>(m_callback_object);
|
||||
result->get("ip", &addr->ip);
|
||||
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);
|
||||
Log::info("GetPeerAddress", "Address gotten successfully.");
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user