From 82c60d6f34af7c5d30430147a9c850c43d91bada Mon Sep 17 00:00:00 2001 From: irungentoo Date: Wed, 27 Nov 2013 16:41:07 -0500 Subject: Fixed ghost peer problem. --- toxcore/group_chats.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'toxcore') diff --git a/toxcore/group_chats.c b/toxcore/group_chats.c index 1637f181..ca41949f 100644 --- a/toxcore/group_chats.c +++ b/toxcore/group_chats.c @@ -235,6 +235,14 @@ static int delpeer(Group_Chat *chat, int peernum) if ((uint32_t)peernum >= chat->numpeers) return -1; + uint32_t i; + for (i = 0; i < GROUP_CLOSE_CONNECTIONS; ++i) { /* If peer is in close list, time it out forcefully. */ + if (id_equal(chat->close[i].client_id, chat->group[peernum].client_id)) { + chat->close[i].last_recv = 0; + break; + } + } + Group_Peer *temp; --chat->numpeers; -- cgit v1.2.3