mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
cleanup
This commit is contained in:
parent
87887b7291
commit
bfa25bac4a
|
@ -1538,7 +1538,7 @@ void net_init_mmsgs(MMSGS* m)
|
|||
m->msgs[i].msg_hdr.msg_iov = &(m->iovecs[i]);
|
||||
m->msgs[i].msg_hdr.msg_iovlen = 1;
|
||||
m->msgs[i].msg_hdr.msg_name = &(m->sockaddrs[i]);
|
||||
m->msgs[i].msg_hdr.msg_namelen = sizeof(struct sockaddr);
|
||||
m->msgs[i].msg_hdr.msg_namelen = sizeof(m->sockaddrs[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1570,7 +1570,7 @@ int net_udp_recv(NETSOCKET sock, NETADDR *addr, void *data, int maxsize, MMSGS*
|
|||
|
||||
if(m->pos < m->size)
|
||||
{
|
||||
sockaddr_to_netaddr(&(m->sockaddrs[m->pos]), addr);
|
||||
sockaddr_to_netaddr((struct sockaddr *)&(m->sockaddrs[m->pos]), addr);
|
||||
// TODO: network_stats
|
||||
//network_stats.recv_bytes += bytes;
|
||||
//network_stats.recv_packets++;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#ifdef CONF_PLATFORM_LINUX
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -765,8 +766,8 @@ typedef struct
|
|||
int size;
|
||||
struct mmsghdr msgs[VLEN];
|
||||
struct iovec iovecs[VLEN];
|
||||
char bufs[VLEN][PACKETSIZE+1];
|
||||
struct sockaddr sockaddrs[VLEN];
|
||||
char bufs[VLEN][PACKETSIZE];
|
||||
struct sockaddr_in sockaddrs[VLEN];
|
||||
#else
|
||||
int dummy;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue