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
path: root/tgl.c
diff options
context:
space:
mode:
authorV V <vvaltman@aurum>2015-10-10 19:53:51 +0300
committerV V <vvaltman@aurum>2015-10-10 19:53:51 +0300
commit6467a94ee3d9f69b6f23d66221f7bd0d58df7ac2 (patch)
tree92f20f39636d84676435b2187a3453e0ee447e37 /tgl.c
parent511860ecf69f51e0a8f2e0617490f81e624e0fb2 (diff)
fixes
Diffstat (limited to 'tgl.c')
-rw-r--r--tgl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tgl.c b/tgl.c
index 77b7b33..44fdb28 100644
--- a/tgl.c
+++ b/tgl.c
@@ -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) {