diff options
author | irungentoo <irungentoo@gmail.com> | 2014-07-05 22:29:30 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-07-05 22:29:30 -0400 |
commit | 04b1b2cfd4f6c3d4ad6034f555236a27d0e5614c (patch) | |
tree | e8ad3d0482a9c9421e0efa0be8c9bccb7c4898f6 /toxcore/Messenger.c | |
parent | dfa483ba0d440519b044f831b3349a562df003e0 (diff) | |
parent | d8406db1133a66d9183c2eade9e4fe0f9f22dd73 (diff) |
Merge branch 'del-failed-groupchats' of https://github.com/JFreegman/ProjectTox-Core
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 2adbd870..b65f09ae 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1206,8 +1206,10 @@ int join_groupchat(Messenger *m, int32_t friendnumber, const uint8_t *friend_gro | |||
1206 | 1206 | ||
1207 | IP_Port friend_ip = get_friend_ipport(m, friendnumber); | 1207 | IP_Port friend_ip = get_friend_ipport(m, friendnumber); |
1208 | 1208 | ||
1209 | if (friend_ip.ip.family == 0) | 1209 | if (friend_ip.ip.family == 0) { |
1210 | del_groupchat(m, groupnum); | ||
1210 | return -1; | 1211 | return -1; |
1212 | } | ||
1211 | 1213 | ||
1212 | id_copy(data, friend_group_public_key); | 1214 | id_copy(data, friend_group_public_key); |
1213 | id_copy(data + crypto_box_PUBLICKEYBYTES, m->chats[groupnum]->self_public_key); | 1215 | id_copy(data + crypto_box_PUBLICKEYBYTES, m->chats[groupnum]->self_public_key); |
@@ -1218,6 +1220,7 @@ int join_groupchat(Messenger *m, int32_t friendnumber, const uint8_t *friend_gro | |||
1218 | return groupnum; | 1220 | return groupnum; |
1219 | } | 1221 | } |
1220 | 1222 | ||
1223 | del_groupchat(m, groupnum); | ||
1221 | return -1; | 1224 | return -1; |
1222 | } | 1225 | } |
1223 | 1226 | ||