summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-11-27 16:41:07 -0500
committerirungentoo <irungentoo@gmail.com>2013-11-27 16:41:07 -0500
commit82c60d6f34af7c5d30430147a9c850c43d91bada (patch)
tree3a4711e550c2c051bc1e217fa03ea3fbcad82c16 /toxcore
parent74b13a9fcfdce5d9513b3d58a9f647a68981b3ed (diff)
Fixed ghost peer problem.
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/group_chats.c8
1 files changed, 8 insertions, 0 deletions
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)
235 if ((uint32_t)peernum >= chat->numpeers) 235 if ((uint32_t)peernum >= chat->numpeers)
236 return -1; 236 return -1;
237 237
238 uint32_t i;
239 for (i = 0; i < GROUP_CLOSE_CONNECTIONS; ++i) { /* If peer is in close list, time it out forcefully. */
240 if (id_equal(chat->close[i].client_id, chat->group[peernum].client_id)) {
241 chat->close[i].last_recv = 0;
242 break;
243 }
244 }
245
238 Group_Peer *temp; 246 Group_Peer *temp;
239 --chat->numpeers; 247 --chat->numpeers;
240 248