mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
fix websockets client link problem in xp
implement a simple version of inet_ntop by myself
This commit is contained in:
parent
65ca97a5fa
commit
b5592cc204
|
@ -90,7 +90,8 @@ static int websocket_callback(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
int orig_port = ntohs(pss->addr.sin_port);
|
||||
pss->send_buffer.Init();
|
||||
char addr_str[NETADDR_MAXSTRSIZE];
|
||||
inet_ntop(AF_INET, &pss->addr.sin_addr, addr_str, sizeof(addr_str));
|
||||
int ip_uint32 = pss->addr.sin_addr.s_addr;
|
||||
str_format(addr_str, sizeof(addr_str), "%d.%d.%d.%d", (ip_uint32)&0xff, (ip_uint32 >> 8) & 0xff, (ip_uint32 >> 16) & 0xff, (ip_uint32 >> 24) & 0xff);
|
||||
dbg_msg("websockets",
|
||||
"connection established with %s:%d",
|
||||
addr_str, orig_port);
|
||||
|
|
Loading…
Reference in a new issue