diff options
author | Vysheng <mail@vysheng.ru> | 2015-01-12 14:18:03 +0300 |
---|---|---|
committer | Vysheng <mail@vysheng.ru> | 2015-01-12 14:18:03 +0300 |
commit | 7f370266688aed5329ea576e9795bb27e74b2bfe (patch) | |
tree | 5d5c104168d2aabecc83f9b67fa0c53929855943 | |
parent | 24ed7ee1fa0520dc4e69e845a84281e034b4c482 (diff) |
Fixed get_difference call on startup
-rw-r--r-- | queries.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -4567,8 +4567,18 @@ void tgl_export_auth_callback (struct tgl_state *TLS, void *arg, int success) { void tgl_export_all_auth (struct tgl_state *TLS) { int i; + int ok = 1; for (i = 0; i <= TLS->max_dc_num; i++) if (TLS->DC_list[i] && !tgl_signed_dc (TLS, TLS->DC_list[i])) { - tgl_do_export_auth (TLS, i, tgl_export_auth_callback, (void*)(long)TLS->DC_list[i]); + tgl_do_export_auth (TLS, i, tgl_export_auth_callback, (void*)(long)TLS->DC_list[i]); + ok = 0; + } + if (ok) { + if (TLS->callback.logged_in) { + TLS->callback.logged_in (TLS); + } + + tglm_send_all_unsent (TLS); + tgl_do_get_difference (TLS, 0, tgl_started_cb, 0); } } |