-
Notifications
You must be signed in to change notification settings - Fork 284
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
Replace part of network functions on platform-independent implementation #461
Conversation
There are many tabs where spaces should be. Comments from Reviewable |
@sudden6 Sorry. Can you check now? |
There are still tabs in: Comments from Reviewable |
@sudden6 Thanks a lot! Fixed. |
I think you forgot to upload the changes^^ |
@sudden6 Hm.. Seems updated |
ok, I see it now too, maybe missed it before |
Reviewed 2 of 29 files at r1, 2 of 7 files at r2, 2 of 13 files at r3. toxcore/network.c, line 1239 at r3 (raw file):
check return value? toxcore/network.c, line 1348 at r3 (raw file):
only IPv4? toxcore/network.h, line 388 at r3 (raw file):
toxcore/network.h, line 392 at r3 (raw file):
toxcore/network.h, line 393 at r3 (raw file):
Comments from Reviewable |
Reviewed 9 of 29 files at r1, 2 of 7 files at r2, 10 of 13 files at r3. Comments from Reviewable |
Review status: 25 of 30 files reviewed at latest revision, 5 unresolved discussions, some commit checks failed. toxcore/network.c, line 1239 at r3 (raw file): Previously, sudden6 wrote…
Done. toxcore/network.c, line 1348 at r3 (raw file): Previously, sudden6 wrote…
Yes. Function renamed and TODO added. toxcore/network.h, line 388 at r3 (raw file): Previously, sudden6 wrote…
Better now? toxcore/network.h, line 392 at r3 (raw file): Previously, sudden6 wrote…
Done. toxcore/network.h, line 393 at r3 (raw file): Previously, sudden6 wrote…
Done. Comments from Reviewable |
Reviewed 1 of 7 files at r4. auto_tests/network_test.c, line 58 at r4 (raw file):
This error message doesn't make sense to me, what does toxcore/crypto_core.c, line 217 at r4 (raw file):
Is there a reason why you used the way with casts instead of the "shift and or" way to change the byte order? Also why does crypto_core need it's own implementation of byte order swapping? If there's a good reason for it, can you add a comment? toxcore/network.c, line 1236 at r4 (raw file):
returning toxcore/network.h, line 388 at r3 (raw file): Previously, Diadlo (Polshakov Dmitry) wrote…
Better but not quite there yet. Which format does toxcore/network.h, line 392 at r4 (raw file):
size in bytes or number of entries? Comments from Reviewable |
Review status: 24 of 30 files reviewed at latest revision, 5 unresolved discussions, some commit checks failed. auto_tests/network_test.c, line 58 at r4 (raw file): Previously, sudden6 wrote…
For me too. But it's out of the scope of this PR. toxcore/crypto_core.c, line 217 at r4 (raw file):
I use cast and "shift and or". Or I don't understand you.
Because toxcore/network.c, line 1236 at r4 (raw file): Previously, sudden6 wrote…
-1 is invalid value and indicate invalid function result. It still can be checked with toxcore/network.h, line 388 at r3 (raw file): Previously, sudden6 wrote…
It's part of toxcore/network.h, line 392 at r4 (raw file): Previously, sudden6 wrote…
AFAIK 'size of array' is alwais mean number of elements (exclude Comments from Reviewable |
Reviewed 3 of 7 files at r4. toxcore/crypto_core.c, line 217 at r4 (raw file): Previously, Diadlo (Polshakov Dmitry) wrote…
I would have done it like this
toxcore/network.c, line 1236 at r4 (raw file): Previously, Diadlo (Polshakov Dmitry) wrote…
Then you'd need to make the invalid value toxcore/network.h, line 392 at r4 (raw file): Previously, Diadlo (Polshakov Dmitry) wrote…
I'd prefer Comments from Reviewable |
Review status: 27 of 30 files reviewed at latest revision, 4 unresolved discussions. toxcore/crypto_core.c, line 217 at r4 (raw file): Previously, sudden6 wrote…
I think, previous variant was more readable. But done. toxcore/network.c, line 1236 at r4 (raw file): Previously, sudden6 wrote…
Changed return type. Done. toxcore/network.h, line 392 at r4 (raw file): Previously, sudden6 wrote…
Done. Comments from Reviewable |
toxcore/crypto_core.c, line 217 at r4 (raw file): Previously, Diadlo (Polshakov Dmitry) wrote…
sorry I forgot one line, Comments from Reviewable |
Reviewed 3 of 4 files at r5. toxcore/crypto_core.c, line 219 at r6 (raw file):
maybe you could switch this line and the line above, so it's 3,2,1,0 toxcore/network.h, line 388 at r3 (raw file): Previously, Diadlo (Polshakov Dmitry) wrote…
There should be a Comments from Reviewable |
Review status: 28 of 30 files reviewed at latest revision, 2 unresolved discussions. toxcore/crypto_core.c, line 217 at r4 (raw file): Previously, sudden6 wrote…
Done. toxcore/crypto_core.c, line 219 at r6 (raw file): Previously, sudden6 wrote…
Done. toxcore/network.h, line 388 at r3 (raw file): Previously, sudden6 wrote…
Done. Comments from Reviewable |
Reviewed 1 of 2 files at r7. Comments from Reviewable |
Reviewed 1 of 1 files at r8. Comments from Reviewable |
@iphydf ping |
Ok, can you rebase and squash? |
@iphydf Ok. Will do it a bit later today |
socket -> net_socket htons -> net_htons htonl -> net_htonl connect -> net_connect sendto -> net_sendto_ip4 getaddrinfo -> net_getipport sa_family_t -> Family
@iphydf Done |
@Diadlo you didn't astyle your code, please fix https://travis-ci.org/TokTok/c-toxcore/jobs/205594073#L2043-L2247. |
other/bootstrap_daemon/src/tox-bootstrapd.c, line 315 at r9 (raw file):
The variable shouldn't have been renamed. Comments from Reviewable |
This change is