Commit Graph

38 Commits

Author SHA1 Message Date
John Preston e3b9927faa Reset session on receiving a really old msgId. 2021-12-07 10:05:41 +04:00
Ilya Fedin b8b268c7cc Add build architecture to version on other systems with non-x86_64 2021-10-29 16:02:41 +04:00
Ilya Fedin 847c01d605 Add Qt 6 support
Tested only on Linux so far
2021-10-21 13:15:00 +04:00
John Preston 19ce1edc16 Use base::SafeRound instead of std::round.
Previous assertion violations because of NaN from std::round were
in video streaming, see commits 27d58ba07b, 8f5830d520.

Now the crashes happened in the ConvertScale() call from a background
thread when preparing an image from clipboard for sending to a chat.
2021-09-27 12:13:57 +04:00
John Preston 8069fdd873 Use base/random.h instead of openssl::RandomValue. 2021-09-15 13:42:22 +03:00
John Preston bae8335285 Always resend messages in a container. 2021-07-13 22:08:09 +03:00
Ilya Fedin 79cc797aff Fix -Wunused-variable warnings 2021-07-13 21:43:34 +03:00
Ilya Fedin 89765340c3 Fix -Wunused-function warnings 2021-07-13 21:31:22 +03:00
John Preston a2c33545d4 Improve some paddings. 2021-06-24 17:44:28 +04:00
John Preston 5eba65aaa0 Remove unused legacy protocol code. 2021-06-24 09:55:57 +04:00
John Preston 8dac6896d6 Set Send/Receive buffer size for download TCP sockets. 2021-06-15 16:45:48 +04:00
John Preston 2843500ce3 Add url with the Focus Assist API information.
Thanks https://www.withinrafael.com/2019/09/19/
determine-if-your-app-is-in-a-focus-assist-profiles-priority-list/
2021-04-26 10:51:10 +04:00
Loïc Molinari 06618a5253 Use fine grained session timers
The check of sent requests and containers is done unconditionally
every second even though the request timeout is 10 seconds and the
container timeout is 600 seconds. This commit uses fine grained timers
instead in order to avoid useless system wake-up events.

The check of sent requests is now scheduled on demand when a new
request is queued. Then the callback, while parsing queued requests,
computes the delta to the closest expiring request and automatically
schedules the next check if necessary.

Given the high value of the container timeout, its callback is called
repeatedly every 600 seconds, unless it computes a lower delta for an
expiring container using the same logic as for the requests.
2021-04-15 16:20:42 +03:00
John Preston 4fc2b1f1a3 Append x64 to app_version on Windows. 2021-03-15 20:14:39 +04:00
Ilya Fedin ae0b9141dd Trying to get rid of unused variables... 2021-03-15 11:40:44 +03:00
Ilya Fedin c4dcf064d5 Avoid multiple .arg usage as suggested by clazy 2021-03-13 19:08:33 +03:00
John Preston 68b0a85369 Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
John Preston 267e5fd9e0 Allow getting outer_msg_id in MTProto handlers. 2021-03-12 16:58:26 +04:00
23rd d4bbbdb65c Replaced rand_value util function with openssl::RandomValue. 2021-01-24 10:41:10 +03:00
23rd dd01ece14a Replaced snap util function with std::clamp. 2021-01-24 10:41:10 +03:00
Crist Ye 60f91ebce4
Using MS/Apple official names for stores (#8959) 2020-11-02 11:14:57 +04:00
Ilya Fedin 12a77cffd8 Add flatpak and snap update URLs 2020-11-01 18:30:12 +03:00
John Preston 303684fef5 Version 2.4.5: Fix build on Xcode 12 and Linux. 2020-10-30 21:30:55 +03:00
John Preston 1aaf7df54a Add labels to call buttons. 2020-08-14 16:53:06 +04:00
John Preston 357caf8007 Keep separate MTP::Config's for separate accounts. 2020-06-23 21:53:41 +04:00
John Preston 7883f97c94 Use precise sync of the server unixtime. 2020-05-12 17:33:06 +04:00
John Preston 6882093ed1 Send init connection params. 2020-04-21 18:55:34 +04:00
John Preston 3e2f4bed50 Update scheme to layer 102.
Support different dice-like media.
2020-04-21 18:55:34 +04:00
Кипорский Алексей ea854e5be3 bugfix: incorrect erase element 2020-03-24 11:31:38 +04:00
John Preston 3e3696298f Fix possible use-after-free in test connections. 2020-02-25 13:40:09 +04:00
John Preston fb36359a6d Disable one failing assertion for now. 2019-12-31 17:26:05 +03:00
John Preston a980fba3aa Create only temporary keys for CDN. 2019-12-28 13:52:29 +03:00
John Preston f91f77ff2e Make temporary keys live one day. 2019-12-10 18:29:18 +03:00
John Preston e60a9f0943 Fix key creation for media cluster. 2019-12-09 18:42:11 +03:00
John Preston e426f2895b Add download sessions if it works fast enough. 2019-12-05 14:46:28 +03:00
John Preston 3ae2986c25 Allow variable count of download sessions. 2019-12-04 09:51:21 +03:00
John Preston 907965531c Don't bind key for more than 10 seconds. 2019-12-02 16:30:33 +03:00
John Preston 91f50e8bdc Move some more code to lib_mtproto. 2019-12-02 16:11:22 +03:00