summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/group.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/toxcore/group.c b/toxcore/group.c
index 5e070623..90e968c3 100644
--- a/toxcore/group.c
+++ b/toxcore/group.c
@@ -267,6 +267,8 @@ static unsigned int pk_in_closest_peers(Group_c *g, uint8_t *real_pk)
267 return 0; 267 return 0;
268} 268}
269 269
270static int send_packet_online(Friend_Connections *fr_c, int friendcon_id, uint16_t group_num, uint8_t *identifier);
271
270static int connect_to_closest(Group_Chats *g_c, int groupnumber) 272static int connect_to_closest(Group_Chats *g_c, int groupnumber)
271{ 273{
272 Group_c *g = get_group_c(g_c, groupnumber); 274 Group_c *g = get_group_c(g_c, groupnumber);
@@ -313,6 +315,9 @@ static int connect_to_closest(Group_Chats *g_c, int groupnumber)
313 } 315 }
314 316
315 add_conn_to_groupchat(g_c, friendcon_id, groupnumber, 1); 317 add_conn_to_groupchat(g_c, friendcon_id, groupnumber, 1);
318 if (friend_con_connected(g_c->fr_c, friendcon_id) == FRIENDCONN_STATUS_CONNECTED) {
319 send_packet_online(g_c->fr_c, friendcon_id, groupnumber, g->identifier);
320 }
316 } 321 }
317 322
318 g->changed = 0; 323 g->changed = 0;
@@ -398,8 +403,6 @@ static int remove_close_conn(Group_Chats *g_c, int groupnumber, int friendcon_id
398 return -1; 403 return -1;
399} 404}
400 405
401static int send_packet_online(Friend_Connections *fr_c, int friendcon_id, uint16_t group_num, uint8_t *identifier);
402
403static void set_conns_type_close(Group_Chats *g_c, int groupnumber, int friendcon_id, uint8_t type) 406static void set_conns_type_close(Group_Chats *g_c, int groupnumber, int friendcon_id, uint8_t type)
404{ 407{
405 Group_c *g = get_group_c(g_c, groupnumber); 408 Group_c *g = get_group_c(g_c, groupnumber);