forked from Green-Sky/tomato
Squashed 'external/toxcore/c-toxcore/' changes from 640e6cace..e58eb27a8
e58eb27a8 fix(toxav): remove extra copy of video frame on encode Tested and works, but there might be alignment issues and other stuff. 206ea3530 refactor: Explicitly pass dependencies to constructors. 7cefa93cf fix(toxencryptsave): Wipe salt and passkey after usage. 7c3be2342 refactor: Add file/line to tox-bootstrapd logging. f84e8cdce refactor: Move loglogdata out of network.c. 390f7db06 refactor: Move random and memory OS-specifics to `os_*` files. REVERT: 640e6cace fix(toxav): remove extra copy of video frame on encode Tested and works, but there might be alignment issues and other stuff. git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: e58eb27a84f9fa0cd996868e079f39e90a5c04b6
This commit is contained in:
@@ -203,16 +203,6 @@ bool onion_friend_is_groupchat(const Onion_Friend *const onion_friend)
|
||||
return onion_friend->is_groupchat;
|
||||
}
|
||||
|
||||
DHT *onion_get_dht(const Onion_Client *onion_c)
|
||||
{
|
||||
return onion_c->dht;
|
||||
}
|
||||
|
||||
Net_Crypto *onion_get_net_crypto(const Onion_Client *onion_c)
|
||||
{
|
||||
return onion_c->c;
|
||||
}
|
||||
|
||||
/** @brief Add a node to the path_nodes bootstrap array.
|
||||
*
|
||||
* If a node with the given public key was already in the bootstrap array, this function has no
|
||||
@@ -2169,7 +2159,8 @@ void do_onion_client(Onion_Client *onion_c)
|
||||
onion_c->last_run = mono_time_get(onion_c->mono_time);
|
||||
}
|
||||
|
||||
Onion_Client *new_onion_client(const Logger *logger, const Memory *mem, const Random *rng, const Mono_Time *mono_time, Net_Crypto *c)
|
||||
Onion_Client *new_onion_client(const Logger *logger, const Memory *mem, const Random *rng, const Mono_Time *mono_time, Net_Crypto *c,
|
||||
DHT *dht, Networking_Core *net)
|
||||
{
|
||||
if (c == nullptr) {
|
||||
return nullptr;
|
||||
@@ -2192,8 +2183,8 @@ Onion_Client *new_onion_client(const Logger *logger, const Memory *mem, const Ra
|
||||
onion_c->logger = logger;
|
||||
onion_c->rng = rng;
|
||||
onion_c->mem = mem;
|
||||
onion_c->dht = nc_get_dht(c);
|
||||
onion_c->net = dht_get_net(onion_c->dht);
|
||||
onion_c->dht = dht;
|
||||
onion_c->net = net;
|
||||
onion_c->c = c;
|
||||
new_symmetric_key(rng, onion_c->secret_symmetric_key);
|
||||
crypto_new_keypair(rng, onion_c->temp_public_key, onion_c->temp_secret_key);
|
||||
|
||||
Reference in New Issue
Block a user