Return nothing from RawConnection::send_no_crypto.
This commit is contained in:
parent
b44e2ea3fc
commit
dc4b5aad51
@ -290,11 +290,11 @@ void AuthKeyHandshake::send(Callback *connection, const Storer &storer) {
|
||||
last_query_.resize(size);
|
||||
auto real_size = storer.store(MutableSlice(last_query_).ubegin());
|
||||
CHECK(real_size == size);
|
||||
return do_send(connection, create_storer(Slice(last_query_)));
|
||||
do_send(connection, create_storer(Slice(last_query_)));
|
||||
}
|
||||
|
||||
void AuthKeyHandshake::do_send(Callback *connection, const Storer &storer) {
|
||||
return connection->send_no_crypto(storer);
|
||||
connection->send_no_crypto(storer);
|
||||
}
|
||||
|
||||
void AuthKeyHandshake::resume(Callback *connection) {
|
||||
|
@ -86,7 +86,7 @@ class RawConnectionDefault final : public RawConnection {
|
||||
return packet_size;
|
||||
}
|
||||
|
||||
MessageId send_no_crypto(const Storer &storer) final {
|
||||
void send_no_crypto(const Storer &storer) final {
|
||||
PacketInfo packet_info;
|
||||
packet_info.no_crypto_flag = true;
|
||||
auto packet = Transport::write(storer, AuthKey(), &packet_info, transport_->max_prepend_size(),
|
||||
@ -94,7 +94,6 @@ class RawConnectionDefault final : public RawConnection {
|
||||
|
||||
LOG(INFO) << "Send handshake packet: " << format::as_hex_dump<4>(packet.as_slice());
|
||||
transport_->write(std::move(packet), false);
|
||||
return packet_info.message_id;
|
||||
}
|
||||
|
||||
PollableFdInfo &get_poll_info() final {
|
||||
@ -315,14 +314,13 @@ class RawConnectionHttp final : public RawConnection {
|
||||
return packet_size;
|
||||
}
|
||||
|
||||
MessageId send_no_crypto(const Storer &storer) final {
|
||||
void send_no_crypto(const Storer &storer) final {
|
||||
PacketInfo packet_info;
|
||||
packet_info.no_crypto_flag = true;
|
||||
auto packet = Transport::write(storer, AuthKey(), &packet_info);
|
||||
|
||||
LOG(INFO) << "Send handshake packet: " << format::as_hex_dump<4>(packet.as_slice());
|
||||
send_packet(packet.as_buffer_slice());
|
||||
return packet_info.message_id;
|
||||
}
|
||||
|
||||
PollableFdInfo &get_poll_info() final {
|
||||
|
@ -7,7 +7,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "td/mtproto/ConnectionManager.h"
|
||||
#include "td/mtproto/MessageId.h"
|
||||
#include "td/mtproto/PacketInfo.h"
|
||||
#include "td/mtproto/TransportType.h"
|
||||
|
||||
@ -51,7 +50,7 @@ class RawConnection {
|
||||
virtual TransportType get_transport_type() const = 0;
|
||||
virtual size_t send_crypto(const Storer &storer, uint64 session_id, int64 salt, const AuthKey &auth_key,
|
||||
uint64 quick_ack_token) = 0;
|
||||
virtual MessageId send_no_crypto(const Storer &storer) = 0;
|
||||
virtual void send_no_crypto(const Storer &storer) = 0;
|
||||
|
||||
virtual PollableFdInfo &get_poll_info() = 0;
|
||||
virtual StatsCallback *stats_callback() = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user