From 80998dc7ec49aadb258d826b85e8c1431805aff9 Mon Sep 17 00:00:00 2001 From: vvaltman Date: Sun, 24 Aug 2014 20:49:06 +0400 Subject: [PATCH] Fixed bug in set_friend() --- binlog.c | 4 ---- interface.c | 2 +- updates.c | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/binlog.c b/binlog.c index a0fe378..d8cd8b5 100644 --- a/binlog.c +++ b/binlog.c @@ -230,7 +230,6 @@ static int fetch_comb_binlog_user_set_phone (void *extra) { } U->user.phone = fetch_str_dup (); - if (tgl_state.callback.user_update) { tgl_state.callback.user_update ((void *)U, TGL_UPDATE_PHONE); } @@ -241,9 +240,6 @@ static int fetch_comb_binlog_user_set_friend (void *extra) { tgl_peer_id_t id = TGL_MK_USER (fetch_int ()); tgl_peer_t *U = tgl_peer_get (id); assert (U); - if (U->user.phone) { - tfree_str (U->user.phone); - } int friend = fetch_int (); if (friend) { U->flags |= FLAG_USER_CONTACT; } else { U->flags &= ~FLAG_USER_CONTACT; } diff --git a/interface.c b/interface.c index d6fa261..86ac33a 100644 --- a/interface.c +++ b/interface.c @@ -617,7 +617,7 @@ void print_user_info_gw (void *extra, int success, struct tgl_user *U) { push_color (COLOR_YELLOW); printf ("User "); print_user_name (U->id, C); - printf (":\n"); + printf (" (#%d):\n", tgl_get_peer_id (U->id)); printf ("\treal name: %s %s\n", U->real_first_name, U->real_last_name); printf ("\tphone: %s\n", U->phone); if (U->status.online > 0) { diff --git a/updates.c b/updates.c index a3039c0..c5f982f 100644 --- a/updates.c +++ b/updates.c @@ -69,7 +69,7 @@ void tglu_fetch_date (void) { } } -void tglu_fetch_seq (void) { +/*void tglu_fetch_seq (void) { int x = fetch_int (); if (x > tgl_state.seq + 1) { vlogprintf (E_NOTICE, "Hole in seq: seq = %d, x = %d\n", tgl_state.seq, x); @@ -79,7 +79,7 @@ void tglu_fetch_seq (void) { tgl_state.seq = x; bl_do_set_seq (tgl_state.seq); } -} +}*/ static void fetch_dc_option (void) { assert (fetch_int () == CODE_dc_option);