Run get_differece on new_session_created
This commit is contained in:
parent
ce61adac12
commit
5cb5b1cfd2
2
loop.c
2
loop.c
@ -586,6 +586,7 @@ void dlist_cb (void *callback_extra, int success, int size, tgl_peer_id_t peers[
|
||||
int loop (void) {
|
||||
//on_start ();
|
||||
tgl_set_callback (&upd_cb);
|
||||
//tgl_state.temp_key_expire_time = 60;
|
||||
tgl_init ();
|
||||
|
||||
if (binlog_enabled) {
|
||||
@ -731,6 +732,7 @@ int loop (void) {
|
||||
tgl_do_get_difference (sync_from_start, get_difference_callback, 0);
|
||||
net_loop (0, dgot);
|
||||
assert (!(tgl_state.locks & TGL_LOCK_DIFF));
|
||||
tgl_state.started = 1;
|
||||
if (wait_dialog_list) {
|
||||
d_got_ok = 0;
|
||||
tgl_do_get_dialog_list (dlist_cb, 0);
|
||||
|
@ -906,7 +906,9 @@ static void work_new_session_created (struct connection *c, long long msg_id UU)
|
||||
//DC->session_id = fetch_long ();
|
||||
fetch_long (); // unique_id
|
||||
tgl_state.net_methods->get_dc (c)->server_salt = fetch_long ();
|
||||
|
||||
if (tgl_state.started && !(tgl_state.locks & TGL_LOCK_DIFF)) {
|
||||
tgl_do_get_difference (0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void work_msgs_ack (struct connection *c UU, long long msg_id UU) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user