Minor Wget improvement.

GitOrigin-RevId: eaf7fb05624fbf01012a83e18e733c77d2b9216c
This commit is contained in:
levlam 2020-05-16 15:57:37 +03:00
parent ea9caab8bc
commit fee023c29f
2 changed files with 3 additions and 5 deletions

View File

@ -14,16 +14,14 @@
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include <string>
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(DEBUG)); SET_VERBOSITY_LEVEL(VERBOSITY_NAME(DEBUG));
td::VERBOSITY_NAME(fd) = VERBOSITY_NAME(INFO); td::VERBOSITY_NAME(fd) = VERBOSITY_NAME(INFO);
std::string url = (argc > 1 ? argv[1] : "https://telegram.org"); td::string url = (argc > 1 ? argv[1] : "https://telegram.org");
auto timeout = 10; auto timeout = 10;
auto ttl = 3; auto ttl = 3;
auto prefer_ipv6 = (argc > 2 && std::string(argv[2]) == "-6"); auto prefer_ipv6 = (argc > 2 && td::string(argv[2]) == "-6");
auto scheduler = td::make_unique<td::ConcurrentScheduler>(); auto scheduler = td::make_unique<td::ConcurrentScheduler>();
scheduler->init(0); scheduler->init(0);
scheduler scheduler

View File

@ -893,7 +893,7 @@ class Master : public Actor {
process_net_query_send_encrypted(std::move(message.data_), std::move(net_query), std::move(callback)); process_net_query_send_encrypted(std::move(message.data_), std::move(net_query), std::move(callback));
} }
void process_net_query_send_encrypted(BufferSlice data, NetQueryPtr net_query, void process_net_query_send_encrypted(BufferSlice data, NetQueryPtr net_query,
ActorShared<NetQueryCallback> callback) { ActorShared<NetQueryCallback> callback) {
BufferSlice answer(8); BufferSlice answer(8);
answer.as_slice().fill(0); answer.as_slice().fill(0);
as<int32>(answer.as_slice().begin()) = my_api::messages_sentEncryptedMessage::ID; as<int32>(answer.as_slice().begin()) = my_api::messages_sentEncryptedMessage::ID;