Skip to content

Commit

Permalink
reask phone number if incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
Vysheng committed Jan 14, 2015
1 parent 928d229 commit 76824c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions queries.c
Original file line number Diff line number Diff line change
Expand Up @@ -4693,8 +4693,16 @@ void tgl_register_cb (struct tgl_state *TLS, char *yn, void *_T) {
}
}

void tgl_sign_in_phone (struct tgl_state *TLS, char *phone, void *arg);
void tgl_sign_in_phone_cb (struct tgl_state *TLS, void *extra, int success, int registered, const char *mhash) {
void **T = extra;
if (!success) {
vlogprintf (E_ERROR, "Incorrect phone number\n");
tfree_str (T[0]);
tfree (T, sizeof (void *) * 4);
TLS->callback.get_string (TLS, "phone number:", 0, tgl_sign_in_phone, NULL);
return;
}
T[1] = tstrdup (mhash);
if (registered) {
TLS->callback.get_string (TLS, "code ('call' for phone call):", 0, tgl_sign_in_code, T);
Expand Down

0 comments on commit 76824c2

Please sign in to comment.