mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #2017 from def-/pr-fix-websockets-warning
Fix Websockets warning
This commit is contained in:
commit
9816881a2a
|
@ -1646,9 +1646,10 @@ int net_udp_recv(NETSOCKET sock, NETADDR *addr, void *buffer, int maxsize, MMSGS
|
|||
if(bytes <= 0 && sock.web_ipv4sock >= 0)
|
||||
{
|
||||
socklen_t fromlen = sizeof(struct sockaddr);
|
||||
bytes = websocket_recv(sock.web_ipv4sock, buffer, maxsize, (struct sockaddr_in *)&sockaddrbuf, fromlen);
|
||||
struct sockaddr_in *sockaddrbuf_in = (struct sockaddr_in *)&sockaddrbuf;
|
||||
bytes = websocket_recv(sock.web_ipv4sock, buffer, maxsize, sockaddrbuf_in, fromlen);
|
||||
*data = buffer;
|
||||
((struct sockaddr_in *)&sockaddrbuf)->sin_family = AF_WEBSOCKET_INET;
|
||||
sockaddrbuf_in->sin_family = AF_WEBSOCKET_INET;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue