summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnsa89 <ansalonistefano@gmail.com>2017-04-16 10:49:56 +0200
committerAnsa89 <ansalonistefano@gmail.com>2017-04-16 10:49:56 +0200
commit439f676d45d75f59f47a000a6adca8e9fe6a6e4e (patch)
treef942e571200889a809b4a78a3dd9dc156656b5ea
parente5655236404f50fbc094dd8eae34cd179bc61747 (diff)
Fix TokTok/c-toxcore#535
-rw-r--r--toxcore/TCP_client.h2
-rw-r--r--toxcore/network.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/TCP_client.h b/toxcore/TCP_client.h
index 8a698869..90002214 100644
--- a/toxcore/TCP_client.h
+++ b/toxcore/TCP_client.h
@@ -58,7 +58,7 @@ enum {
58}; 58};
59typedef struct { 59typedef struct {
60 uint8_t status; 60 uint8_t status;
61 Socket sock; 61 Socket sock;
62#ifdef HAVE_LIBEV 62#ifdef HAVE_LIBEV
63 struct { 63 struct {
64 ev_io listener; 64 ev_io listener;
diff --git a/toxcore/network.c b/toxcore/network.c
index f74363e6..a68e91f4 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -674,6 +674,8 @@ Networking_Core *new_networking_ex(Logger *log, IP ip, uint16_t port_from, uint1
674 struct sockaddr_storage addr; 674 struct sockaddr_storage addr;
675 size_t addrsize; 675 size_t addrsize;
676 676
677 memset(&addr, 0, sizeof(struct sockaddr_storage));
678
677 if (temp->family == AF_INET) { 679 if (temp->family == AF_INET) {
678 struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr; 680 struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr;
679 681