diff options
author | V V <vvaltman@aurum> | 2015-10-10 19:53:51 +0300 |
---|---|---|
committer | V V <vvaltman@aurum> | 2015-10-10 19:53:51 +0300 |
commit | 6467a94ee3d9f69b6f23d66221f7bd0d58df7ac2 (patch) | |
tree | 92f20f39636d84676435b2187a3453e0ee447e37 /tgl.c | |
parent | 511860ecf69f51e0a8f2e0617490f81e624e0fb2 (diff) |
fixes
Diffstat (limited to 'tgl.c')
-rw-r--r-- | tgl.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -66,7 +66,7 @@ void tgl_set_rsa_key_direct (struct tgl_state *TLS, unsigned long e, int n_bytes TLS->rsa_key_num ++; } -void tgl_init (struct tgl_state *TLS) { +int tgl_init (struct tgl_state *TLS) { assert (TLS->timer_methods); assert (TLS->net_methods); if (!TLS->callback.create_print_name) { @@ -79,12 +79,15 @@ void tgl_init (struct tgl_state *TLS) { TLS->message_list.next_use = &TLS->message_list; TLS->message_list.prev_use = &TLS->message_list; - tglmp_on_start (TLS); + if (tglmp_on_start (TLS) < 0) { + return -1; + } if (!TLS->app_id) { TLS->app_id = TG_APP_ID; TLS->app_hash = tstrdup (TG_APP_HASH); } + return 0; } int tgl_authorized_dc (struct tgl_state *TLS, struct tgl_dc *DC) { |