-
Notifications
You must be signed in to change notification settings - Fork 291
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
Finish @Diadlo's network Family abstraction. #823
Conversation
0195dca
to
498532c
Compare
559b2d8
to
9761a97
Compare
toxcore/LAN_discovery.c
Outdated
/* moot check: only TOX_AF_INET returned (backwards compat.) */ | ||
if (i_faces[i].ifr_broadaddr.sa_family != TOX_AF_INET) { | ||
/* moot check: only AF_INET returned (backwards compat.) */ | ||
if (i_faces[i].ifr_broadaddr.sa_family != AF_INET) { |
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.
TODO avoid using AF_INET
directly and remove windows headers?
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.
Can't really avoid these, because the whole function is heavily system-dependent. Maybe it needs to be moved into network.c.
Reviewed 38 of 38 files at r1. Comments from Reviewable |
c9829b5
to
593ca28
Compare
a8f5f7f
to
0d198bd
Compare
Reviewed 38 of 38 files at r1. Comments from Reviewable |
053f36f
to
5db13a3
Compare
7b46273
to
901fff4
Compare
The Family stuff in toxcore is a big mess. I'm sure I saw a bunch of bugs on the way, but I'm not verifying that code now, so the bugs stay.
v0.2.3 **Merged PRs:** - [TokTok#951] Only run astyle if the astyle binary exists. - [TokTok#950] Remove utils.c and utils.h from toxencryptsave build. - [TokTok#949] Fixes to the imported sodium sources to compile without warnings. - [TokTok#948] Add a MAX_HOSTNAME_LENGTH constant. - [TokTok#947] Remove the format test. - [TokTok#937] Add new Circle CI configuration. - [TokTok#935] Add a test for double conference invite. - [TokTok#933] Add Logger to various net_crypto functions, and add `const` to Logger where possible. - [TokTok#931] Avoid conditional-uninitialised warning for tcp test. - [TokTok#930] Disable UDP when proxy is enabled. - [TokTok#928] Use clang-format for C++ code. - [TokTok#927] Add assertions to bootstrap tests for correct connection type. - [TokTok#926] Make NULL options behave the same as default options. - [TokTok#925] Add tests for what happens when passing an invalid proxy host. - [TokTok#924] Make the net_crypto connection state an enum. - [TokTok#922] Clarify/Improve test_some test - [TokTok#921] Beginnings of a TCP_test.c overhaul - [TokTok#920] Add test for creating multiple conferences in one tox. - [TokTok#918] Merge irungentoo/master into toktok - [TokTok#917] Add random testing program. - [TokTok#916] Fix linking with address sanitizer. - [TokTok#915] Remove resource_leak_test. - [TokTok#914] Make dht_test more stable. - [TokTok#913] Minor cleanup: return early on error condition. - [TokTok#906] Sort bazel build file according to buildifier standard. - [TokTok#905] In DEBUG mode, make toxcore crash on signed integer overflow. - [TokTok#902] Log only the filename, not the full path in LOGGER. - [TokTok#899] Fix macOS macro because of GNU Mach - [TokTok#898] Fix enumeration of Crypto_Connection instances - [TokTok#897] Fix ipport_isset: port 0 is not a valid port. - [TokTok#894] Fix logging related crash in bootstrap node - [TokTok#893] Fix bootstrap crashes, still - [TokTok#892] Add empty logger to DHT bootstrap daemons. - [TokTok#887] Fix FreeBSD build on Travis - [TokTok#884] Fix the often call of event tox_friend_connection_status - [TokTok#883] Make toxcore compile on BSD - [TokTok#878] fix DHT_bootstrap key loading - [TokTok#877] Add minitox to under "Other resources" section in the README - [TokTok#875] Make bootstrap daemon use toxcore's version - [TokTok#867] Improve network error reporting on Windows - [TokTok#841] Only check full rtp offset if RTP_LARGE_FRAME is set - [TokTok#823] Finish @Diadlo's network Family abstraction. - [TokTok#822] Move system header includes from network.h to network.c
v0.2.3 **Merged PRs:** - [TokTok#951] Only run astyle if the astyle binary exists. - [TokTok#950] Remove utils.c and utils.h from toxencryptsave build. - [TokTok#949] Fixes to the imported sodium sources to compile without warnings. - [TokTok#948] Add a MAX_HOSTNAME_LENGTH constant. - [TokTok#947] Remove the format test. - [TokTok#937] Add new Circle CI configuration. - [TokTok#935] Add a test for double conference invite. - [TokTok#933] Add Logger to various net_crypto functions, and add `const` to Logger where possible. - [TokTok#931] Avoid conditional-uninitialised warning for tcp test. - [TokTok#930] Disable UDP when proxy is enabled. - [TokTok#928] Use clang-format for C++ code. - [TokTok#927] Add assertions to bootstrap tests for correct connection type. - [TokTok#926] Make NULL options behave the same as default options. - [TokTok#925] Add tests for what happens when passing an invalid proxy host. - [TokTok#924] Make the net_crypto connection state an enum. - [TokTok#922] Clarify/Improve test_some test - [TokTok#921] Beginnings of a TCP_test.c overhaul - [TokTok#920] Add test for creating multiple conferences in one tox. - [TokTok#918] Merge irungentoo/master into toktok - [TokTok#917] Add random testing program. - [TokTok#916] Fix linking with address sanitizer. - [TokTok#915] Remove resource_leak_test. - [TokTok#914] Make dht_test more stable. - [TokTok#913] Minor cleanup: return early on error condition. - [TokTok#906] Sort bazel build file according to buildifier standard. - [TokTok#905] In DEBUG mode, make toxcore crash on signed integer overflow. - [TokTok#902] Log only the filename, not the full path in LOGGER. - [TokTok#899] Fix macOS macro because of GNU Mach - [TokTok#898] Fix enumeration of Crypto_Connection instances - [TokTok#897] Fix ipport_isset: port 0 is not a valid port. - [TokTok#894] Fix logging related crash in bootstrap node - [TokTok#893] Fix bootstrap crashes, still - [TokTok#892] Add empty logger to DHT bootstrap daemons. - [TokTok#887] Fix FreeBSD build on Travis - [TokTok#884] Fix the often call of event tox_friend_connection_status - [TokTok#883] Make toxcore compile on BSD - [TokTok#878] fix DHT_bootstrap key loading - [TokTok#877] Add minitox to under "Other resources" section in the README - [TokTok#875] Make bootstrap daemon use toxcore's version - [TokTok#867] Improve network error reporting on Windows - [TokTok#841] Only check full rtp offset if RTP_LARGE_FRAME is set - [TokTok#823] Finish @Diadlo's network Family abstraction. - [TokTok#822] Move system header includes from network.h to network.c
The Family stuff in toxcore is a big mess. I'm sure I saw a bunch of bugs
on the way, but I'm not verifying that code now, so the bugs stay.
This change is