Skip to content
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
wants to merge 456 commits into
base: master
Choose a base branch
from
Open

test: test #26

wants to merge 456 commits into from

Conversation

JFreegman
Copy link
Owner

test

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
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 JFreegman force-pushed the ngc_jf branch 12 times, most recently from 38c3c5b to ac3344f Compare April 1, 2022 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants