summaryrefslogtreecommitdiff
path: root/toxcore/network.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-09-02 11:41:06 -0400
committerirungentoo <irungentoo@gmail.com>2013-09-02 11:41:06 -0400
commit385772065899f7263b6edee15e6f83f1ecd4245e (patch)
tree104f446e4f1b4770da1a7ad5dbef4ba9d8e61096 /toxcore/network.c
parent52336565612207fdb2d2068989da936b5b83ceeb (diff)
Fixed some warnings.
Diffstat (limited to 'toxcore/network.c')
-rw-r--r--toxcore/network.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/toxcore/network.c b/toxcore/network.c
index 34775570..d8ae7750 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -60,7 +60,11 @@ uint32_t random_int(void)
60/* Basic network functions: 60/* Basic network functions:
61 * Function to send packet(data) of length length to ip_port. 61 * Function to send packet(data) of length length to ip_port.
62 */ 62 */
63#ifdef WIN32
64int sendpacket(unsigned int sock, IP_Port ip_port, uint8_t *data, uint32_t length)
65#else
63int sendpacket(int sock, IP_Port ip_port, uint8_t *data, uint32_t length) 66int sendpacket(int sock, IP_Port ip_port, uint8_t *data, uint32_t length)
67#endif
64{ 68{
65 ADDR addr = {AF_INET, ip_port.port, ip_port.ip}; 69 ADDR addr = {AF_INET, ip_port.port, ip_port.ip};
66 return sendto(sock, (char *) data, length, 0, (struct sockaddr *)&addr, sizeof(addr)); 70 return sendto(sock, (char *) data, length, 0, (struct sockaddr *)&addr, sizeof(addr));
@@ -72,7 +76,11 @@ int sendpacket(int sock, IP_Port ip_port, uint8_t *data, uint32_t length)
72 * Packet length is put into length. 76 * Packet length is put into length.
73 * Dump all empty packets. 77 * Dump all empty packets.
74 */ 78 */
79#ifdef WIN32
80static int receivepacket(unsigned int sock, IP_Port *ip_port, uint8_t *data, uint32_t *length)
81#else
75static int receivepacket(int sock, IP_Port *ip_port, uint8_t *data, uint32_t *length) 82static int receivepacket(int sock, IP_Port *ip_port, uint8_t *data, uint32_t *length)
83#endif
76{ 84{
77 ADDR addr; 85 ADDR addr;
78#ifdef WIN32 86#ifdef WIN32