Improve handling of peers entering and leaving conferences#1267
Conversation
|
Make sure you run astyle so Travis doesn't freak out. |
|
You also need to fix the codefactor issues. 3 of them are about there being redundant or unnecessary newlines, one is because a method in this patch is more "complex" than codefactor likes (has too many arguments, return paths, etc.) |
Codecov Report
@@ Coverage Diff @@
## master #1267 +/- ##
========================================
+ Coverage 83% 83% +<.1%
========================================
Files 82 82
Lines 14928 14957 +29
========================================
+ Hits 12392 12418 +26
- Misses 2536 2539 +3
Continue to review full report at Codecov.
|
|
From my own use, I used to reproduce a corruption of the tox savefile frequently when running off tip. Since I switched to this PR branch, I haven't seen it once. To recover from the corrupt save file, downgrading toxcore to before persistent conferences were introduced, loading then saving, then upgrading to this PR should fix it. Upgrading to this PR directly from a corrupt save file on tip will just fail to load completely. |
sudden6
left a comment
There was a problem hiding this comment.
Reviewed 7 of 8 files at r1, 1 of 1 files at r2.
Reviewable status: 0 of 1 approvals obtained (waiting on @zugz)
toxcore/group.c, line 472 at r1 (raw file):
} static bool delete_frozen(Group_c *g, uint32_t frozen_index)
add nullptr check or comment that g must not be nullptr
toxcore/group.c, line 1713 at r1 (raw file):
* return -1 on failure */ static int group_leave(const Group_Chats *g_c, uint32_t groupnumber, bool permanent)
why change the return type? IIRC we're trying to use bool for success/failure return codes
toxcore/group.c, line 1678 at r2 (raw file):
* return -1 on failure */ static int group_freeze_peer_send(const Group_Chats *g_c, uint32_t groupnumber, uint16_t peer_num)
use bool for success/error return types?
robinlinden
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 approvals obtained (waiting on @sudden6 and @zugz)
toxcore/group.c, line 472 at r1 (raw file):
Previously, sudden6 wrote…
add
nullptrcheck or comment thatgmust not benullptr
That's fine for functions in the public API, but I think that's unnecessary for things that are only used internally in Toxcore.
sudden6
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r3.
Reviewable status: 0 of 1 approvals obtained
toxcore/group.c, line 472 at r1 (raw file):
Previously, robinlinden (Robin Lindén) wrote…
That's fine for functions in the public API, but I think that's unnecessary for things that are only used internally in Toxcore.
ok, ignoring this then.
331e18e to
ad58050
Compare
|
#1285 may be related to this change. |
4f3756c to
096dd8d
Compare
* send freeze packet on quit * delete existing peers with same real_pk on adding a peer * record actual number of conference peers saved
(based on #1266)
This change is