From 8dd17ec6bc6e3d1e9082f15efc6b4778cbc04b1e Mon Sep 17 00:00:00 2001 From: vysheng Date: Tue, 12 Aug 2014 21:51:16 +0000 Subject: [PATCH] Some renaming --- binlog.c | 102 +++++++++++++++++++++++------------------------ binlog.h | 24 +++++------ binlog.tl | 27 +++++++------ mtproto-client.c | 4 +- queries.c | 2 +- structures.c | 24 +++++------ 6 files changed, 92 insertions(+), 91 deletions(-) diff --git a/binlog.c b/binlog.c index 1292a94..56c8fbc 100644 --- a/binlog.c +++ b/binlog.c @@ -420,7 +420,7 @@ int fetch_comb_binlog_encr_chat_requested (void *extra) { return 0; } -int fetch_comb_binlog_set_encr_chat_access_hash (void *extra) { +int fetch_comb_binlog_encr_chat_set_access_hash (void *extra) { peer_id_t id = MK_ENCR_CHAT (fetch_int ()); peer_t *U = user_chat_get (id); assert (U); @@ -432,7 +432,7 @@ int fetch_comb_binlog_set_encr_chat_access_hash (void *extra) { return 0; } -int fetch_comb_binlog_set_encr_chat_date (void *extra) { +int fetch_comb_binlog_encr_chat_set_date (void *extra) { peer_id_t id = MK_ENCR_CHAT (fetch_int ()); peer_t *U = user_chat_get (id); assert (U); @@ -444,7 +444,7 @@ int fetch_comb_binlog_set_encr_chat_date (void *extra) { return 0; } -int fetch_comb_binlog_set_encr_chat_state (void *extra) { +int fetch_comb_binlog_encr_chat_set_state (void *extra) { peer_id_t id = MK_ENCR_CHAT (fetch_int ()); peer_t *U = user_chat_get (id); assert (U); @@ -483,7 +483,7 @@ int fetch_comb_binlog_encr_chat_accepted (void *extra) { return 0; } -int fetch_comb_binlog_set_encr_chat_key (void *extra) { +int fetch_comb_binlog_encr_chat_set_key (void *extra) { peer_id_t id = MK_ENCR_CHAT (fetch_int ()); peer_t *_U = user_chat_get (id); assert (_U); @@ -560,7 +560,7 @@ int fetch_comb_binlog_chat_change_flags (void *extra) { return 0; } -int fetch_comb_binlog_set_chat_title (void *extra) { +int fetch_comb_binlog_chat_set_title (void *extra) { peer_t *C = user_chat_get (MK_CHAT (fetch_int ())); assert (C && (C->flags & FLAG_CREATED)); @@ -579,7 +579,7 @@ int fetch_comb_binlog_set_chat_title (void *extra) { return 0; } -int fetch_comb_binlog_set_chat_photo (void *extra) { +int fetch_comb_binlog_chat_set_photo (void *extra) { peer_t *C = user_chat_get (MK_CHAT (fetch_int ())); assert (C && (C->flags & FLAG_CREATED)); fetch_data (&C->photo_big, sizeof (struct file_location)); @@ -591,7 +591,7 @@ int fetch_comb_binlog_set_chat_photo (void *extra) { return 0; } -int fetch_comb_binlog_set_chat_date (void *extra) { +int fetch_comb_binlog_chat_set_date (void *extra) { peer_t *C = user_chat_get (MK_CHAT (fetch_int ())); assert (C && (C->flags & FLAG_CREATED)); C->chat.date = fetch_int (); @@ -602,7 +602,7 @@ int fetch_comb_binlog_set_chat_date (void *extra) { return 0; } -int fetch_comb_binlog_set_chat_version (void *extra) { +int fetch_comb_binlog_chat_set_version (void *extra) { peer_t *C = user_chat_get (MK_CHAT (fetch_int ())); assert (C && (C->flags & FLAG_CREATED)); C->chat.version = fetch_int (); @@ -614,7 +614,7 @@ int fetch_comb_binlog_set_chat_version (void *extra) { return 0; } -int fetch_comb_binlog_set_chat_admin (void *extra) { +int fetch_comb_binlog_chat_set_admin (void *extra) { peer_t *C = user_chat_get (MK_CHAT (fetch_int ())); assert (C && (C->flags & FLAG_CREATED)); C->chat.admin_id = fetch_int (); @@ -625,7 +625,7 @@ int fetch_comb_binlog_set_chat_admin (void *extra) { return 0; } -int fetch_comb_binlog_set_chat_participants (void *extra) { +int fetch_comb_binlog_chat_set_participants (void *extra) { peer_t *C = user_chat_get (MK_CHAT (fetch_int ())); assert (C && (C->flags & FLAG_CREATED)); C->chat.user_list_version = fetch_int (); @@ -640,7 +640,7 @@ int fetch_comb_binlog_set_chat_participants (void *extra) { return 0; } -int fetch_comb_binlog_chat_full_photo (void *extra) { +int fetch_comb_binlog_chat_set_full_photo (void *extra) { peer_t *C = user_chat_get (MK_CHAT (fetch_int ())); assert (C && (C->flags & FLAG_CREATED)); @@ -656,7 +656,7 @@ int fetch_comb_binlog_chat_full_photo (void *extra) { return 0; } -int fetch_comb_binlog_add_chat_participant (void *extra) { +int fetch_comb_binlog_chat_add_participant (void *extra) { peer_id_t id = MK_CHAT (fetch_int ()); peer_t *_C = user_chat_get (id); assert (_C && (_C->flags & FLAG_CREATED)); @@ -686,7 +686,7 @@ int fetch_comb_binlog_add_chat_participant (void *extra) { return 0; } -int fetch_comb_binlog_del_chat_participant (void *extra) { +int fetch_comb_binlog_chat_del_participant (void *extra) { peer_id_t id = MK_CHAT (fetch_int ()); peer_t *_C = user_chat_get (id); assert (_C && (_C->flags & FLAG_CREATED)); @@ -1166,24 +1166,24 @@ void replay_log_event (void) { FETCH_COMBINATOR_FUNCTION (binlog_user_set_real_name) FETCH_COMBINATOR_FUNCTION (binlog_encr_chat_delete) FETCH_COMBINATOR_FUNCTION (binlog_encr_chat_requested) - FETCH_COMBINATOR_FUNCTION (binlog_set_encr_chat_access_hash) - FETCH_COMBINATOR_FUNCTION (binlog_set_encr_chat_date) - FETCH_COMBINATOR_FUNCTION (binlog_set_encr_chat_state) + FETCH_COMBINATOR_FUNCTION (binlog_encr_chat_set_access_hash) + FETCH_COMBINATOR_FUNCTION (binlog_encr_chat_set_date) + FETCH_COMBINATOR_FUNCTION (binlog_encr_chat_set_state) FETCH_COMBINATOR_FUNCTION (binlog_encr_chat_accepted) - FETCH_COMBINATOR_FUNCTION (binlog_set_encr_chat_key) + FETCH_COMBINATOR_FUNCTION (binlog_encr_chat_set_key) FETCH_COMBINATOR_FUNCTION (binlog_encr_chat_init) FETCH_COMBINATOR_FUNCTION (binlog_chat_create) FETCH_COMBINATOR_FUNCTION (binlog_chat_change_flags) - FETCH_COMBINATOR_FUNCTION (binlog_set_chat_title) - FETCH_COMBINATOR_FUNCTION (binlog_set_chat_photo) - FETCH_COMBINATOR_FUNCTION (binlog_set_chat_date) - FETCH_COMBINATOR_FUNCTION (binlog_set_chat_version) - FETCH_COMBINATOR_FUNCTION (binlog_set_chat_admin) - FETCH_COMBINATOR_FUNCTION (binlog_set_chat_participants) - FETCH_COMBINATOR_FUNCTION (binlog_chat_full_photo) - FETCH_COMBINATOR_FUNCTION (binlog_add_chat_participant) - FETCH_COMBINATOR_FUNCTION (binlog_del_chat_participant) + FETCH_COMBINATOR_FUNCTION (binlog_chat_set_title) + FETCH_COMBINATOR_FUNCTION (binlog_chat_set_photo) + FETCH_COMBINATOR_FUNCTION (binlog_chat_set_date) + FETCH_COMBINATOR_FUNCTION (binlog_chat_set_version) + FETCH_COMBINATOR_FUNCTION (binlog_chat_set_admin) + FETCH_COMBINATOR_FUNCTION (binlog_chat_set_participants) + FETCH_COMBINATOR_FUNCTION (binlog_chat_set_full_photo) + FETCH_COMBINATOR_FUNCTION (binlog_chat_add_participant) + FETCH_COMBINATOR_FUNCTION (binlog_chat_del_participant) FETCH_COMBINATOR_FUNCTION (binlog_create_message_text) FETCH_COMBINATOR_FUNCTION (binlog_send_message_text) @@ -1513,28 +1513,28 @@ void bl_do_encr_chat_requested (struct secret_chat *U, long long access_hash, in add_log_event (ev, 540); } -void bl_do_set_encr_chat_access_hash (struct secret_chat *U, long long access_hash) { +void bl_do_encr_chat_set_access_hash (struct secret_chat *U, long long access_hash) { if (U->access_hash == access_hash) { return; } int *ev = alloc_log_event (16); - ev[0] = CODE_binlog_set_encr_chat_access_hash; + ev[0] = CODE_binlog_encr_chat_set_access_hash; ev[1] = get_peer_id (U->id); *(long long *)(ev + 2) = access_hash; add_log_event (ev, 16); } -void bl_do_set_encr_chat_date (struct secret_chat *U, int date) { +void bl_do_encr_chat_set_date (struct secret_chat *U, int date) { if (U->date == date) { return; } int *ev = alloc_log_event (12); - ev[0] = CODE_binlog_set_encr_chat_date; + ev[0] = CODE_binlog_encr_chat_set_date; ev[1] = get_peer_id (U->id); ev[2] = date; add_log_event (ev, 12); } -void bl_do_set_encr_chat_state (struct secret_chat *U, enum secret_chat_state state) { +void bl_do_encr_chat_set_state (struct secret_chat *U, enum secret_chat_state state) { if (U->state == state) { return; } int *ev = alloc_log_event (12); - ev[0] = CODE_binlog_set_encr_chat_state; + ev[0] = CODE_binlog_encr_chat_set_state; ev[1] = get_peer_id (U->id); ev[2] = state; add_log_event (ev, 12); @@ -1551,9 +1551,9 @@ void bl_do_encr_chat_accepted (struct secret_chat *U, const unsigned char g_key[ add_log_event (ev, 528); } -void bl_do_set_encr_chat_key (struct secret_chat *E, unsigned char key[], long long key_fingerprint) { +void bl_do_encr_chat_set_key (struct secret_chat *E, unsigned char key[], long long key_fingerprint) { int *ev = alloc_log_event (272); - ev[0] = CODE_binlog_set_encr_chat_key; + ev[0] = CODE_binlog_encr_chat_set_key; ev[1] = get_peer_id (E->id); memcpy (ev + 2, key, 256); *(long long *)(ev + 66) = key_fingerprint; @@ -1641,36 +1641,36 @@ void bl_do_chat_forbid (struct chat *C, int on) { } } -void bl_do_set_chat_title (struct chat *C, const char *s, int l) { +void bl_do_chat_set_title (struct chat *C, const char *s, int l) { if (C->title && (int)strlen (C->title) == l && !strncmp (C->title, s, l)) { return; } clear_packet (); - out_int (CODE_binlog_set_chat_title); + out_int (CODE_binlog_chat_set_title); out_int (get_peer_id (C->id)); out_cstring (s, l); add_log_event (packet_buffer, 4 * (packet_ptr - packet_buffer)); } -void bl_do_set_chat_photo (struct chat *C, struct file_location *big, struct file_location *small) { +void bl_do_chat_set_photo (struct chat *C, struct file_location *big, struct file_location *small) { if (!memcmp (&C->photo_small, small, sizeof (struct file_location)) && !memcmp (&C->photo_big, big, sizeof (struct file_location))) { return; } clear_packet (); - out_int (CODE_binlog_set_chat_photo); + out_int (CODE_binlog_chat_set_photo); out_int (get_peer_id (C->id)); out_data (big, sizeof (struct file_location)); out_data (small, sizeof (struct file_location)); add_log_event (packet_buffer, 4 * (packet_ptr - packet_buffer)); } -void bl_do_set_chat_date (struct chat *C, int date) { +void bl_do_chat_set_date (struct chat *C, int date) { if (C->date == date) { return; } int *ev = alloc_log_event (12); - ev[0] = CODE_binlog_set_chat_date; + ev[0] = CODE_binlog_chat_set_date; ev[1] = get_peer_id (C->id); ev[2] = date; add_log_event (ev, 12); } -void bl_do_set_chat_set_in_chat (struct chat *C, int on) { +void bl_do_chat_set_set_in_chat (struct chat *C, int on) { if (on) { if (C->flags & FLAG_CHAT_IN_CHAT) { return; } int *ev = alloc_log_event (16); @@ -1690,29 +1690,29 @@ void bl_do_set_chat_set_in_chat (struct chat *C, int on) { } } -void bl_do_set_chat_version (struct chat *C, int version, int user_num) { +void bl_do_chat_set_version (struct chat *C, int version, int user_num) { if (C->version >= version) { return; } int *ev = alloc_log_event (16); - ev[0] = CODE_binlog_set_chat_version; + ev[0] = CODE_binlog_chat_set_version; ev[1] = get_peer_id (C->id); ev[2] = version; ev[3] = user_num; add_log_event (ev, 16); } -void bl_do_set_chat_admin (struct chat *C, int admin) { +void bl_do_chat_set_admin (struct chat *C, int admin) { if (C->admin_id == admin) { return; } int *ev = alloc_log_event (12); - ev[0] = CODE_binlog_set_chat_admin; + ev[0] = CODE_binlog_chat_set_admin; ev[1] = get_peer_id (C->id); ev[2] = admin; add_log_event (ev, 12); } -void bl_do_set_chat_participants (struct chat *C, int version, int user_num, struct chat_user *users) { +void bl_do_chat_set_participants (struct chat *C, int version, int user_num, struct chat_user *users) { if (C->user_list_version >= version) { return; } int *ev = alloc_log_event (12 * user_num + 16); - ev[0] = CODE_binlog_set_chat_participants; + ev[0] = CODE_binlog_chat_set_participants; ev[1] = get_peer_id (C->id); ev[2] = version; ev[3] = user_num; @@ -1720,10 +1720,10 @@ void bl_do_set_chat_participants (struct chat *C, int version, int user_num, str add_log_event (ev, 12 * user_num + 16); } -void bl_do_set_chat_full_photo (struct chat *U, const int *start, int len) { +void bl_do_chat_set_full_photo (struct chat *U, const int *start, int len) { if (U->photo.id == *(long long *)(start + 1)) { return; } int *ev = alloc_log_event (len + 8); - ev[0] = CODE_binlog_chat_full_photo; + ev[0] = CODE_binlog_chat_set_full_photo; ev[1] = get_peer_id (U->id); memcpy (ev + 2, start, len); add_log_event (ev, len + 8); @@ -1732,7 +1732,7 @@ void bl_do_set_chat_full_photo (struct chat *U, const int *start, int len) { void bl_do_chat_add_user (struct chat *C, int version, int user, int inviter, int date) { if (C->user_list_version >= version || !C->user_list_version) { return; } int *ev = alloc_log_event (24); - ev[0] = CODE_binlog_add_chat_participant; + ev[0] = CODE_binlog_chat_add_participant; ev[1] = get_peer_id (C->id); ev[2] = version; ev[3] = user; @@ -1744,7 +1744,7 @@ void bl_do_chat_add_user (struct chat *C, int version, int user, int inviter, in void bl_do_chat_del_user (struct chat *C, int version, int user) { if (C->user_list_version >= version || !C->user_list_version) { return; } int *ev = alloc_log_event (16); - ev[0] = CODE_binlog_add_chat_participant; + ev[0] = CODE_binlog_chat_del_participant; ev[1] = get_peer_id (C->id); ev[2] = version; ev[3] = user; diff --git a/binlog.h b/binlog.h index 75b126e..b2f14c0 100644 --- a/binlog.h +++ b/binlog.h @@ -43,11 +43,11 @@ void bl_do_user_set_real_name (struct user *U, const char *f, int fl, const char void bl_do_encr_chat_delete (struct secret_chat *U); void bl_do_encr_chat_requested (struct secret_chat *U, long long access_hash, int date, int admin_id, int user_id, unsigned char g_key[], unsigned char nonce[]); -void bl_do_set_encr_chat_access_hash (struct secret_chat *U, long long access_hash); -void bl_do_set_encr_chat_date (struct secret_chat *U, int date); -void bl_do_set_encr_chat_state (struct secret_chat *U, enum secret_chat_state state); +void bl_do_encr_chat_set_access_hash (struct secret_chat *U, long long access_hash); +void bl_do_encr_chat_set_date (struct secret_chat *U, int date); +void bl_do_encr_chat_set_state (struct secret_chat *U, enum secret_chat_state state); void bl_do_encr_chat_accepted (struct secret_chat *U, const unsigned char g_key[], const unsigned char nonce[], long long key_fingerprint); -void bl_do_set_encr_chat_key (struct secret_chat *E, unsigned char key[], long long key_fingerprint); +void bl_do_encr_chat_set_key (struct secret_chat *E, unsigned char key[], long long key_fingerprint); void bl_do_encr_chat_init (int id, int user_id, unsigned char random[], unsigned char g_a[]); void bl_do_dc_signed (int id); @@ -61,14 +61,14 @@ void bl_do_set_date (int date); void bl_do_create_chat (struct chat *C, int y, const char *s, int l, int users_num, int date, int version, struct file_location *big, struct file_location *small); void bl_do_chat_forbid (struct chat *C, int on); -void bl_do_set_chat_title (struct chat *C, const char *s, int l); -void bl_do_set_chat_photo (struct chat *C, struct file_location *big, struct file_location *small); -void bl_do_set_chat_date (struct chat *C, int date); -void bl_do_set_chat_set_in_chat (struct chat *C, int on); -void bl_do_set_chat_version (struct chat *C, int version, int user_num); -void bl_do_set_chat_admin (struct chat *C, int admin); -void bl_do_set_chat_participants (struct chat *C, int version, int user_num, struct chat_user *users); -void bl_do_set_chat_full_photo (struct chat *U, const int *start, int len); +void bl_do_chat_set_title (struct chat *C, const char *s, int l); +void bl_do_chat_set_photo (struct chat *C, struct file_location *big, struct file_location *small); +void bl_do_chat_set_date (struct chat *C, int date); +void bl_do_chat_set_set_in_chat (struct chat *C, int on); +void bl_do_chat_set_version (struct chat *C, int version, int user_num); +void bl_do_chat_set_admin (struct chat *C, int admin); +void bl_do_chat_set_participants (struct chat *C, int version, int user_num, struct chat_user *users); +void bl_do_chat_set_full_photo (struct chat *U, const int *start, int len); void bl_do_chat_add_user (struct chat *C, int version, int user, int inviter, int date); void bl_do_chat_del_user (struct chat *C, int version, int user); diff --git a/binlog.tl b/binlog.tl index c81c60d..5232aac 100644 --- a/binlog.tl +++ b/binlog.tl @@ -30,24 +30,25 @@ binlog.userSetPhoto id:int photo:UserProfilePhoto = binlog.Update; binlog.encrChatDelete id:int = binlog.Update; binlog.encrChatRequested id:int hash:long date:int admin:int user:int key:64*[int] nonce:64*[int] = binlog.Update; -binlog.setEncrChatAccessHash id:int hash:long = binlog.Update; -binlog.setEncrChatDate id:int date:int = binlog.Update; -binlog.setEncrChatState id:int state:int = binlog.Update; binlog.encrChatAccepted id:int key:64*[int] nonce:64*[int] fingerprint:long = binlog.Update; -binlog.setEncrChatKey id:int key:64*[int] fingerprint:long = binlog.Update; binlog.encrChatInit id:int user:int key:64*[int] g_key:64*[int] = binlog.Update; +binlog.encrChatSetAccessHash id:int hash:long = binlog.Update; +binlog.encrChatSetDate id:int date:int = binlog.Update; +binlog.encrChatSetState id:int state:int = binlog.Update; +binlog.encrChatSetKey id:int key:64*[int] fingerprint:long = binlog.Update; + binlog.chatCreate id:int flags:int title:string user_num:int date:int version:int photo_big:%binlog.FileLocation photo_small:%binlog.FileLocation = binlog.Update; binlog.chatChangeFlags id:int set_flags:int clear_flags:int = binlog.Update; -binlog.setChatTitle id:int title:string = binlog.Update; -binlog.setChatPhoto id:int photo_big:%binlog.FileLocation photo_small:%binlog.FileLocation = binlog.Update; -binlog.setChatDate id:int date:int = binlog.Update; -binlog.setChatVersion id:int version:int users_num:int = binlog.Update; -binlog.setChatAdmin id:int admin:int = binlog.Update; -binlog.setChatParticipants id:int version:int participants:%(Vector %binlog.ChatParticipant) = binlog.Update; -binlog.chatFullPhoto id:int photo:Photo = binlog.Update; -binlog.addChatParticipant id:int version:int user:%binlog.ChatParticipant = binlog.Update; -binlog.delChatParticipant id:int version:int user:int = binlog.Update; +binlog.chatSetTitle id:int title:string = binlog.Update; +binlog.chatSetPhoto id:int photo_big:%binlog.FileLocation photo_small:%binlog.FileLocation = binlog.Update; +binlog.chatSetDate id:int date:int = binlog.Update; +binlog.chatSetVersion id:int version:int users_num:int = binlog.Update; +binlog.chatSetAdmin id:int admin:int = binlog.Update; +binlog.chatSetParticipants id:int version:int participants:%(Vector %binlog.ChatParticipant) = binlog.Update; +binlog.chatSetFullPhoto id:int photo:Photo = binlog.Update; +binlog.chatAddParticipant id:int version:int user:%binlog.ChatParticipant = binlog.Update; +binlog.chatDelParticipant id:int version:int user:int = binlog.Update; binlog.createMessageText id:int from_id:int to_type:int to_id:int date:int text:string = binlog.Update; binlog.sendMessageText id:long from_id:int to_type:int to_id:int date:int text:string = binlog.Update; diff --git a/mtproto-client.c b/mtproto-client.c index ec3ec6f..acdd990 100644 --- a/mtproto-client.c +++ b/mtproto-client.c @@ -1119,7 +1119,7 @@ void work_update (struct connection *c UU, long long msg_id UU) { peer_t *C = user_chat_get (chat_id); if (C && (C->flags & FLAG_CREATED)) { if (x == CODE_chat_participants) { - bl_do_set_chat_admin (&C->chat, fetch_int ()); + bl_do_chat_set_admin (&C->chat, fetch_int ()); assert (fetch_int () == CODE_vector); n = fetch_int (); struct chat_user *users = talloc (12 * n); @@ -1131,7 +1131,7 @@ void work_update (struct connection *c UU, long long msg_id UU) { users[i].date = fetch_int (); } int version = fetch_int (); - bl_do_set_chat_participants (&C->chat, version, n, users); + bl_do_chat_set_participants (&C->chat, version, n, users); } } else { if (x == CODE_chat_participants) { diff --git a/queries.c b/queries.c index 52b84fa..30fb598 100644 --- a/queries.c +++ b/queries.c @@ -2389,7 +2389,7 @@ void do_send_accept_encr_chat (struct secret_chat *E, unsigned char *random) { static unsigned char sha_buffer[20]; sha1 (kk, 256, sha_buffer); - bl_do_set_encr_chat_key (E, kk, *(long long *)(sha_buffer + 12)); + bl_do_encr_chat_set_key (E, kk, *(long long *)(sha_buffer + 12)); clear_packet (); out_int (CODE_messages_accept_encryption); diff --git a/structures.c b/structures.c index 080d21c..0bd75f2 100644 --- a/structures.c +++ b/structures.c @@ -307,8 +307,8 @@ void fetch_encrypted_chat (struct secret_chat *U) { bl_do_encr_chat_requested (U, access_hash, date, admin_id, user_id, (void *)g_key, (void *)nonce); write_secret_chat_file (); } else { - bl_do_set_encr_chat_access_hash (U, fetch_long ()); - bl_do_set_encr_chat_date (U, fetch_int ()); + bl_do_encr_chat_set_access_hash (U, fetch_long ()); + bl_do_encr_chat_set_date (U, fetch_int ()); if (fetch_int () != U->admin_id) { logprintf ("Changed admin in secret chat. WTF?\n"); return; @@ -318,7 +318,7 @@ void fetch_encrypted_chat (struct secret_chat *U) { return; } if (x == CODE_encrypted_chat_waiting) { - bl_do_set_encr_chat_state (U, sc_waiting); + bl_do_encr_chat_set_state (U, sc_waiting); write_secret_chat_file (); return; // We needed only access hash from here } @@ -413,7 +413,7 @@ void fetch_chat (struct chat *C) { } int l = prefetch_strlen (); char *s = fetch_str (l); - bl_do_set_chat_title (C, s, l); + bl_do_chat_set_title (C, s, l); struct file_location small; struct file_location big; @@ -430,13 +430,13 @@ void fetch_chat (struct chat *C) { fetch_file_location (&small); fetch_file_location (&big); } - bl_do_set_chat_photo (C, &big, &small); + bl_do_chat_set_photo (C, &big, &small); int users_num = fetch_int (); - bl_do_set_chat_date (C, fetch_int ()); - bl_do_set_chat_set_in_chat (C, fetch_bool ()); - bl_do_set_chat_version (C, users_num, fetch_int ()); + bl_do_chat_set_date (C, fetch_int ()); + bl_do_chat_set_set_in_chat (C, fetch_bool ()); + bl_do_chat_set_version (C, users_num, fetch_int ()); } else { - bl_do_set_chat_date (C, fetch_int ()); + bl_do_chat_set_date (C, fetch_int ()); } } } @@ -486,13 +486,13 @@ void fetch_chat_full (struct chat *C) { fetch_alloc_user (); } if (admin_id) { - bl_do_set_chat_admin (C, admin_id); + bl_do_chat_set_admin (C, admin_id); } if (version > 0) { - bl_do_set_chat_participants (C, version, users_num, users); + bl_do_chat_set_participants (C, version, users_num, users); tfree (users, sizeof (struct chat_user) * users_num); } - bl_do_set_chat_full_photo (C, start, 4 * (end - start)); + bl_do_chat_set_full_photo (C, start, 4 * (end - start)); } void fetch_photo_size (struct photo_size *S) {