diff --git a/loop.c b/loop.c index 5dcc97a..be76da8 100644 --- a/loop.c +++ b/loop.c @@ -545,13 +545,13 @@ int loop (void) { exit (EXIT_SUCCESS); } char *first_name; - printf ("Name: "); + printf ("First name: "); if (net_getline (&first_name, &size) == -1) { perror ("getline()"); exit (EXIT_FAILURE); } char *last_name; - printf ("Name: "); + printf ("Last name: "); if (net_getline (&last_name, &size) == -1) { perror ("getline()"); exit (EXIT_FAILURE); diff --git a/queries.c b/queries.c index 35a36f4..633f601 100644 --- a/queries.c +++ b/queries.c @@ -527,6 +527,9 @@ int do_auth_check_phone (const char *user) { check_phone_result = -1; send_query (DC_working, packet_ptr - packet_buffer, packet_buffer, &check_phone_methods, 0); net_loop (0, cr_f); + check_phone_result = -1; + send_query (DC_working, packet_ptr - packet_buffer, packet_buffer, &check_phone_methods, 0); + net_loop (0, cr_f); return check_phone_result; } /* }}} */ diff --git a/structures.c b/structures.c index 71d5f2f..adda1a7 100644 --- a/structures.c +++ b/structures.c @@ -168,7 +168,7 @@ char *create_print_name (peer_id_t id, const char *a1, const char *a2, const cha int cc = 0; while (1) { peer_t *P = peer_lookup_name (s); - if (!P || !cmp_peer_id (Peers[i]->id, id)) { + if (!P || !cmp_peer_id (P->id, id)) { break; } cc ++;