mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Return TOX_ERR_CONFERENCE_SEND_MESSAGE_NO_CONNECTION if we are not connected to any peers
This commit is contained in:
parent
60cd08e774
commit
0bf90df5e1
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user