MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / start

Function start

Telegram/SourceFiles/core/utils.cpp:58–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56namespace ThirdParty {
57
58 void start() {
59 Platform::ThirdParty::start();
60
61 if (!RAND_status()) { // should be always inited in all modern OS
62 const auto FeedSeed = [](auto value) {
63 RAND_seed(&value, sizeof(value));
64 };
65#ifdef Q_OS_WIN
66 LARGE_INTEGER li;
67 QueryPerformanceFrequency(&li);
68 FeedSeed(li.QuadPart);
69 QueryPerformanceCounter(&li);
70 FeedSeed(li.QuadPart);
71#elif defined Q_OS_MAC
72 mach_timebase_info_data_t tb = { 0 };
73 mach_timebase_info(&tb);
74 FeedSeed(tb);
75 FeedSeed(mach_absolute_time());
76#else
77 timespec ts = { 0 };
78 clock_gettime(CLOCK_MONOTONIC, &ts);
79 FeedSeed(ts);
80#endif
81 if (!RAND_status()) {
82 LOG(("MTP Error: Could not init OpenSSL rand, RAND_status() is 0..."));
83 }
84 }
85 }
86
87 void finish() {
88#if OPENSSL_VERSION_NUMBER >= 0x30000000L

Callers 15

PingThreadMethod · 0.70
execMethod · 0.70
runMethod · 0.70
startLocalStorageMethod · 0.70
HttpLoaderActorMethod · 0.70
FlatpakCheckerMethod · 0.70
checkMethod · 0.70
scheduleNextMethod · 0.70
testMethod · 0.70
AddMyChannelsBoxFunction · 0.50
StickerPreviewFunction · 0.50
PhotoPreloadMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected