Small bugfixes
This commit is contained in:
parent
f496648d33
commit
e615891d88
@ -1708,12 +1708,13 @@ void secret_chat_update_gw (struct tgl_secret_chat *U, unsigned flags) {
|
||||
write_secret_chat_file ();
|
||||
}
|
||||
|
||||
if (!binlog_read) { return; }
|
||||
|
||||
if ((flags & TGL_UPDATE_REQUESTED) && !disable_auto_accept) {
|
||||
tgl_do_accept_encr_chat_request (U, 0, 0);
|
||||
}
|
||||
|
||||
if (disable_output && !notify_ev) { return; }
|
||||
if (!binlog_read) { return; }
|
||||
struct in_ev *ev = notify_ev;
|
||||
|
||||
|
||||
|
@ -1408,12 +1408,17 @@ void tglmp_regenerate_temp_auth_key (struct tgl_dc *D) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
struct tgl_session *S = D->sessions[0];
|
||||
tglt_secure_random (&S->session_id, 8);
|
||||
S->seq_no = 0;
|
||||
|
||||
event_del (S->ev);
|
||||
S->ack_tree = tree_clear_long (S->ack_tree);
|
||||
|
||||
if (D->state != st_authorized) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (S->c) {
|
||||
create_temp_auth_key (S->c);
|
||||
|
@ -2970,6 +2970,8 @@ void tgl_do_send_accept_encr_chat (struct tgl_secret_chat *E, unsigned char *ran
|
||||
}
|
||||
return;
|
||||
} // Already generated key for this chat
|
||||
assert (E->g_key);
|
||||
assert (tgl_state.BN_ctx);
|
||||
unsigned char random_here[256];
|
||||
tglt_secure_random (random_here, 256);
|
||||
for (i = 0; i < 256; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user