Fixes small bug in query resend while changing session

This commit is contained in:
vvaltman 2014-08-29 17:48:47 +04:00
parent e179f25fe9
commit 13aab3bbd5
2 changed files with 3 additions and 1 deletions

View File

@ -112,7 +112,9 @@ static int alarm_query (struct query *q) {
tglmp_encrypt_send_message (q->session->c, packet_buffer, packet_ptr - packet_buffer, q->flags & QUERY_FORCE_SEND); tglmp_encrypt_send_message (q->session->c, packet_buffer, packet_ptr - packet_buffer, q->flags & QUERY_FORCE_SEND);
} else { } else {
queries_tree = tree_delete_query (queries_tree, q);
q->msg_id = tglmp_encrypt_send_message (q->session->c, q->data, q->data_len, (q->flags & QUERY_FORCE_SEND) | 1); q->msg_id = tglmp_encrypt_send_message (q->session->c, q->data, q->data_len, (q->flags & QUERY_FORCE_SEND) | 1);
queries_tree = tree_insert_query (queries_tree, q, lrand48 ());
q->session_id = q->session->session_id; q->session_id = q->session->session_id;
if (!(q->session->dc->flags & 4) && !(q->flags & QUERY_FORCE_SEND)) { if (!(q->session->dc->flags & 4) && !(q->flags & QUERY_FORCE_SEND)) {
q->session_id = 0; q->session_id = 0;

2
tgl.c
View File

@ -70,7 +70,7 @@ void tgl_init (void) {
tgl_state.callback.create_print_name = tgls_default_create_print_name; tgl_state.callback.create_print_name = tgls_default_create_print_name;
} }
if (!tgl_state.temp_key_expire_time) { if (!tgl_state.temp_key_expire_time) {
tgl_state.temp_key_expire_time = 60; //100000; tgl_state.temp_key_expire_time = 100000;
} }
tglmp_on_start (); tglmp_on_start ();