Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/tgl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVysheng <mail@vysheng.ru>2015-01-12 14:18:03 +0300
committerVysheng <mail@vysheng.ru>2015-01-12 14:18:03 +0300
commit7f370266688aed5329ea576e9795bb27e74b2bfe (patch)
tree5d5c104168d2aabecc83f9b67fa0c53929855943
parent24ed7ee1fa0520dc4e69e845a84281e034b4c482 (diff)
Fixed get_difference call on startup
-rw-r--r--queries.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/queries.c b/queries.c
index 65581ca..e5860df 100644
--- a/queries.c
+++ b/queries.c
@@ -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);
}
}