Skip to content

Commit

Permalink
Return TOX_ERR_CONFERENCE_SEND_MESSAGE_NO_CONNECTION if we are not co…
Browse files Browse the repository at this point in the history
…nnected to any peers
  • Loading branch information
zugz committed Nov 22, 2018
1 parent d89f83f commit 4463aa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toxcore/group.c
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,7 @@ static unsigned int send_lossy_all_close(const Group_Chats *g_c, uint32_t groupn
* return -1 if groupnumber is invalid.
* return -2 if message is too long.
* return -3 if we are not connected to the group.
* reutrn -4 if message failed to send.
* return -4 if message failed to send.
*/
static int send_message_group(const Group_Chats *g_c, uint32_t groupnumber, uint8_t message_id, const uint8_t *data,
uint16_t len)
Expand All @@ -2272,7 +2272,7 @@ static int send_message_group(const Group_Chats *g_c, uint32_t groupnumber, uint
return -2;
}

if (g->status != GROUPCHAT_STATUS_CONNECTED) {
if (g->status != GROUPCHAT_STATUS_CONNECTED || count_close_connected(g) == 0) {
return -3;
}

Expand Down

0 comments on commit 4463aa9

Please sign in to comment.