summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-12-01 19:39:10 -0500
committerirungentoo <irungentoo@gmail.com>2014-12-01 19:39:10 -0500
commita6e1a7477916c666c7d8b56864bdd3e73c6fb567 (patch)
treef2fbe41cb97fe8806bfb8818b34f31d8edbc3d10
parent8e2b8d468af468c91fb753fd5aee944f84d6c89c (diff)
Prevent joining groupchat more than once.
-rw-r--r--toxcore/group.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/toxcore/group.c b/toxcore/group.c
index e03ed141..3d060bf0 100644
--- a/toxcore/group.c
+++ b/toxcore/group.c
@@ -934,6 +934,9 @@ int join_groupchat(Group_Chats *g_c, int32_t friendnumber, uint8_t expected_type
934 if (friendcon_id == -1) 934 if (friendcon_id == -1)
935 return -1; 935 return -1;
936 936
937 if (get_group_num(g_c, data + sizeof(uint16_t)) != -1)
938 return -1;
939
937 int groupnumber = create_group_chat(g_c); 940 int groupnumber = create_group_chat(g_c);
938 941
939 if (groupnumber == -1) 942 if (groupnumber == -1)