forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 3
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
test: test #26
Open
JFreegman
wants to merge
456
commits into
master
Choose a base branch
from
ngc_jf
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
test: test #26
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We now pass the moderation object instead of the entire chat object to sanctions related functions in order to reduce the scope of the chat object. We additionally keep our self extended public/secret keys in the moderation object
group_moderation.c no longer depends on group_chats.h
moderation related structs and constants are now named more appropriately and a few structs are turned into typedefs
We now pass GC_Session objects instead of the Messenger object to functions whenever applicable. This allows us to reduce many redundant chat object fetches and lots of unnecessary error handling
info struct used to be a union when we had differet types of sanctions (bans) but it is no longer necessary. We also rename key variables for less ambiguity while reading the code.
Instead of having to maintain and sync copies of shared state or passing variables to functions, we just use pointers now. This guarantees that the shared state will never accidentally go out of sync and makes things a lot simpler
This addresses endian related compatibility issues when transferring the tox save file between different devices
- Remove unnecessary parens - Use calloc over malloc for struct allocations
When a group is private we were only sending a few handshake packets before giving up forever. Since there was no DHT telling us about other peers in the group, this means that if we failed to handshake on our first attempt, we would never be able to connect until a manual reconnect attempt.
Even if the save file is corrupt we should still fail gracefully
This is no longer used
According to the C standard, calloc can return null if zero is passed to its nmemb param. Since we sometimes were passing zero to that param, it was possible for the function to return an error when it shouldn't have
In cases where we're not connecting right away we now give some rest time between handshake attempts. We now also do all peer loading before handshakes in the same place
unpack_gc_saved_peers() now returns the correct value. We also make sure that both functions are completely symmetrical both when successful and when errors occur.
JFreegman
force-pushed
the
ngc_jf
branch
12 times, most recently
from
April 1, 2022 21:49
38c3c5b
to
ac3344f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
test