forked from Green-Sky/tomato
Squashed 'external/toxcore/c-toxcore/' changes from e29e185c03..f1df709b87
f1df709b87 feat: add ngc events 1b6c907235 refactor: Make event dispatch ordered by receive time. b7f9367f6f test: Upgrade cppcheck, fix some warnings. 766e62bc89 chore: Use `pkg_search_module` directly in cmake. 00ff078f91 cleanup: Use target_link_libraries directly in cmake. c58928cc89 chore: Add `IMPORTED_TARGET` to pkg-config packages. 895a6af122 cleanup: Remove NaCl support. 41dfb1c1c0 fix: unpack enum function names in event impl generator 447666d1a1 chore: Disable targets for cross-compilation. 572924e924 chore: Build a docker image with coverage info in it. 415cb78f5e cleanup: Some portability/warning fixes for Windows builds. 425216d9ec fix: Correct a use-after-free and fix some memory leaks. 4b1cfa3e08 refactor: Change all enum-like `#define` sequences into enums. d3c2704fa9 chore: Fix make_single_file to support core-only. 0ce46b644e refactor: Change the `TCP_PACKET_*` defines into an enum. 22cd38ad50 adopt event impl generation tool to #2392 f31ea1088a add the event impl generation tool 4e603bb613 refactor: Use `enum-from-int` rule from tokstyle. 19d8f180d6 chore: Update github actions `uses`. 6a895be0c7 test: Make esp32 build actually try to instantiate tox. 65d09c9bfb cleanup: Remove test net support. REVERT: e29e185c03 feat: add ngc events git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: f1df709b8792da4c0e946d826b11df77d565064d
This commit is contained in:
@ -671,7 +671,6 @@ static int client_send_announce_request(Onion_Client *onion_c, uint32_t num, con
|
||||
onion_friend->temp_secret_key, ping_id, onion_friend->real_public_key,
|
||||
zero_ping_id, sendback);
|
||||
} else { // contact is a gc
|
||||
#ifndef VANILLA_NACL
|
||||
onion_friend->is_groupchat = true;
|
||||
|
||||
len = create_gca_announce_request(
|
||||
@ -679,9 +678,6 @@ static int client_send_announce_request(Onion_Client *onion_c, uint32_t num, con
|
||||
onion_friend->temp_secret_key, ping_id, onion_friend->real_public_key,
|
||||
zero_ping_id, sendback, onion_friend->gc_data,
|
||||
onion_friend->gc_data_length);
|
||||
#else
|
||||
return -1;
|
||||
#endif // VANILLA_NACL
|
||||
}
|
||||
}
|
||||
|
||||
@ -1996,6 +1992,9 @@ static void do_announce(Onion_Client *onion_c)
|
||||
// Don't send announces to the same node twice. If we don't have many nodes,
|
||||
// the random selection below may have overlaps. This ensures that we deduplicate
|
||||
// nodes before sending packets to save some bandwidth.
|
||||
//
|
||||
// TODO(iphydf): Figure out why on esp32, this is necessary for the onion
|
||||
// connection to succeed. This is an optimisation and shouldn't be necessary.
|
||||
const uint8_t *targets[MAX_ONION_CLIENTS_ANNOUNCE / 2];
|
||||
unsigned int targets_count = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user