Minor refactoring.

GitOrigin-RevId: 7c02341c8382c976da485fb7e28de6dd75cd3d1c
This commit is contained in:
levlam 2019-11-13 20:10:22 +03:00
parent 7de4f8b078
commit 0044ce9bd3
1 changed files with 3 additions and 2 deletions

View File

@ -808,8 +808,9 @@ std::pair<uint64, BufferSlice> SessionConnection::encrypted_bind(int64 perm_key,
info.salt = Random::secure_int64();
info.session_id = Random::secure_int64();
auto packet = BufferWriter{Transport::write(query_storer, auth_data_->get_main_auth_key(), &info), 0, 0};
Transport::write(query_storer, auth_data_->get_main_auth_key(), &info, packet.as_slice());
const AuthKey &main_auth_key = auth_data_->get_main_auth_key();
auto packet = BufferWriter{Transport::write(query_storer, main_auth_key, &info), 0, 0};
Transport::write(query_storer, main_auth_key, &info, packet.as_slice());
return std::make_pair(query.message_id, packet.as_buffer_slice());
}