diff --git a/queries.c b/queries.c index d19213b..9ef33cc 100644 --- a/queries.c +++ b/queries.c @@ -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); } 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); + queries_tree = tree_insert_query (queries_tree, q, lrand48 ()); q->session_id = q->session->session_id; if (!(q->session->dc->flags & 4) && !(q->flags & QUERY_FORCE_SEND)) { q->session_id = 0; diff --git a/tgl.c b/tgl.c index 5bc157b..05b3e4d 100644 --- a/tgl.c +++ b/tgl.c @@ -70,7 +70,7 @@ void tgl_init (void) { tgl_state.callback.create_print_name = tgls_default_create_print_name; } 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 ();