diff options
author | zugz (tox) <mbays+tox@sdf.org> | 2018-11-22 22:31:21 +0100 |
---|---|---|
committer | zugz (tox) <mbays+tox@sdf.org> | 2018-11-23 17:53:50 +0100 |
commit | 0bf90df5e138e926fac9073f371b9b9be4af40c3 (patch) | |
tree | 6cef4c04d2f025324c3688614dc35cb8ee51e629 /toxcore | |
parent | 60cd08e774a98780cb7a3e03281be5de4cb782d7 (diff) |
Return TOX_ERR_CONFERENCE_SEND_MESSAGE_NO_CONNECTION if we are not connected to any peers
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/group.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/group.c b/toxcore/group.c index ee9548a1..9ef32b72 100644 --- a/toxcore/group.c +++ b/toxcore/group.c | |||
@@ -2257,7 +2257,7 @@ static unsigned int send_lossy_all_close(const Group_Chats *g_c, uint32_t groupn | |||
2257 | * return -1 if groupnumber is invalid. | 2257 | * return -1 if groupnumber is invalid. |
2258 | * return -2 if message is too long. | 2258 | * return -2 if message is too long. |
2259 | * return -3 if we are not connected to the group. | 2259 | * return -3 if we are not connected to the group. |
2260 | * reutrn -4 if message failed to send. | 2260 | * return -4 if message failed to send. |
2261 | */ | 2261 | */ |
2262 | static int send_message_group(const Group_Chats *g_c, uint32_t groupnumber, uint8_t message_id, const uint8_t *data, | 2262 | static int send_message_group(const Group_Chats *g_c, uint32_t groupnumber, uint8_t message_id, const uint8_t *data, |
2263 | uint16_t len) | 2263 | uint16_t len) |
@@ -2272,7 +2272,7 @@ static int send_message_group(const Group_Chats *g_c, uint32_t groupnumber, uint | |||
2272 | return -2; | 2272 | return -2; |
2273 | } | 2273 | } |
2274 | 2274 | ||
2275 | if (g->status != GROUPCHAT_STATUS_CONNECTED) { | 2275 | if (g->status != GROUPCHAT_STATUS_CONNECTED || count_close_connected(g) == 0) { |
2276 | return -3; | 2276 | return -3; |
2277 | } | 2277 | } |
2278 | 2278 | ||