-
Notifications
You must be signed in to change notification settings - Fork 296
Improve handling of peers entering and leaving conferences #1267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
nullptr
check or comment thatg
must 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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