Squashed 'external/toxcore/c-toxcore/' changes from 03e9fbf3703..e740b4e3b2e
e740b4e3b2e feat: Implement Tox network profiler git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: e740b4e3b2e3aa594ab259e2a80153f5eed8fd16
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "logger.h"
|
||||
#include "mem.h"
|
||||
#include "mono_time.h"
|
||||
#include "net_profile.h"
|
||||
#include "network.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -3227,3 +3228,18 @@ void kill_net_crypto(Net_Crypto *c)
|
||||
crypto_memzero(c, sizeof(Net_Crypto));
|
||||
mem_delete(mem, c);
|
||||
}
|
||||
|
||||
const Net_Profile *nc_get_tcp_client_net_profile(const Net_Crypto *c)
|
||||
{
|
||||
if (c == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const TCP_Connections *tcp_c = nc_get_tcp_c(c);
|
||||
|
||||
if (tcp_c == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return tcp_connection_get_client_net_profile(tcp_c);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user