Add some CHECKs.
GitOrigin-RevId: 8959575d05c189d0a3e65e44a81d9e6954fe0a9e
This commit is contained in:
parent
158dc49438
commit
b301a35fce
@ -20583,7 +20583,8 @@ void MessagesManager::send_get_dialog_query(DialogId dialog_id, Promise<Unit> &&
|
|||||||
logevent_id = binlog_add(G()->td_db()->get_binlog(), LogEvent::HandlerType::GetDialogFromServer, storer);
|
logevent_id = binlog_add(G()->td_db()->get_binlog(), LogEvent::HandlerType::GetDialogFromServer, storer);
|
||||||
}
|
}
|
||||||
if (logevent_id != 0) {
|
if (logevent_id != 0) {
|
||||||
get_dialog_query_logevent_id_[dialog_id] = logevent_id;
|
auto result = get_dialog_query_logevent_id_.emplace(dialog_id, logevent_id);
|
||||||
|
CHECK(result.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(INFO) << "Send get " << dialog_id << " query";
|
LOG(INFO) << "Send get " << dialog_id << " query";
|
||||||
@ -23619,7 +23620,7 @@ void MessagesManager::do_delete_message_logevent(const DeleteMessageLogEvent &lo
|
|||||||
Promise<Unit> db_promise;
|
Promise<Unit> db_promise;
|
||||||
if (!logevent.file_ids_.empty()) {
|
if (!logevent.file_ids_.empty()) {
|
||||||
auto logevent_id = logevent.id_;
|
auto logevent_id = logevent.id_;
|
||||||
if (!logevent_id) {
|
if (logevent_id == 0) {
|
||||||
auto storer = LogEventStorerImpl<DeleteMessageLogEvent>(logevent);
|
auto storer = LogEventStorerImpl<DeleteMessageLogEvent>(logevent);
|
||||||
logevent_id = binlog_add(G()->td_db()->get_binlog(), LogEvent::HandlerType::DeleteMessage, storer);
|
logevent_id = binlog_add(G()->td_db()->get_binlog(), LogEvent::HandlerType::DeleteMessage, storer);
|
||||||
}
|
}
|
||||||
|
@ -767,6 +767,7 @@ void SecretChatActor::do_create_chat_impl(std::unique_ptr<logevent::CreateSecret
|
|||||||
}
|
}
|
||||||
void SecretChatActor::on_discard_encryption_result(NetQueryPtr result) {
|
void SecretChatActor::on_discard_encryption_result(NetQueryPtr result) {
|
||||||
CHECK(close_flag_);
|
CHECK(close_flag_);
|
||||||
|
CHECK(close_logevent_id_ != 0);
|
||||||
LOG(INFO) << "Got result for messages.discardEncryption";
|
LOG(INFO) << "Got result for messages.discardEncryption";
|
||||||
binlog_erase(context_->binlog(), close_logevent_id_);
|
binlog_erase(context_->binlog(), close_logevent_id_);
|
||||||
// skip flush
|
// skip flush
|
||||||
|
Reference in New Issue
Block a user