diff options
Diffstat (limited to 'toxcore/group_chats.c')
-rw-r--r-- | toxcore/group_chats.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/group_chats.c b/toxcore/group_chats.c index 1e5309ad..f37c6a9c 100644 --- a/toxcore/group_chats.c +++ b/toxcore/group_chats.c | |||
@@ -189,7 +189,7 @@ static int send_groupchatpacket(Group_Chat *chat, IP_Port ip_port, uint8_t *publ | |||
189 | if (len == -1) | 189 | if (len == -1) |
190 | return -1; | 190 | return -1; |
191 | 191 | ||
192 | if (sendpacket(chat->net->sock, ip_port, packet, len) == len) | 192 | if (sendpacket(chat->net, ip_port, packet, len) == len) |
193 | return 0; | 193 | return 0; |
194 | 194 | ||
195 | return -1; | 195 | return -1; |
@@ -208,7 +208,7 @@ static uint8_t sendto_allpeers(Group_Chat *chat, uint8_t *data, uint16_t length, | |||
208 | uint64_t temp_time = unix_time(); | 208 | uint64_t temp_time = unix_time(); |
209 | 209 | ||
210 | for (i = 0; i < GROUP_CLOSE_CONNECTIONS; ++i) { | 210 | for (i = 0; i < GROUP_CLOSE_CONNECTIONS; ++i) { |
211 | if (chat->close[i].ip_port.ip.uint32 != 0 && chat->close[i].last_recv + BAD_NODE_TIMEOUT > temp_time) { | 211 | if (ip_isset(&chat->close[i].ip_port.ip) && chat->close[i].last_recv + BAD_NODE_TIMEOUT > temp_time) { |
212 | if (send_groupchatpacket(chat, chat->close[i].ip_port, chat->close[i].client_id, data, length, request_id) == 0) | 212 | if (send_groupchatpacket(chat, chat->close[i].ip_port, chat->close[i].client_id, data, length, request_id) == 0) |
213 | ++sent; | 213 | ++sent; |
214 | } | 214 | } |