aboutsummaryrefslogtreecommitdiff
path: root/src/reducer/anastasis_api_recovery_redux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reducer/anastasis_api_recovery_redux.c')
-rw-r--r--src/reducer/anastasis_api_recovery_redux.c33
1 files changed, 27 insertions, 6 deletions
diff --git a/src/reducer/anastasis_api_recovery_redux.c b/src/reducer/anastasis_api_recovery_redux.c
index 684b877..897a6dd 100644
--- a/src/reducer/anastasis_api_recovery_redux.c
+++ b/src/reducer/anastasis_api_recovery_redux.c
@@ -1697,12 +1697,33 @@ select_challenge_cb (void *cls,
1697 return; 1697 return;
1698 } 1698 }
1699 /* trigger challenge */ 1699 /* trigger challenge */
1700 ret = ANASTASIS_challenge_start (ci, 1700 {
1701 psp, 1701 json_t *c = find_challenge_in_cs (sctx->state,
1702 timeout, 1702 &cd->uuid);
1703 NULL, /* no answer */ 1703 json_t *pin = json_object_get (c,
1704 &answer_feedback_cb, 1704 "answer-pin");
1705 sctx); 1705
1706 if (NULL != pin)
1707 {
1708 uint64_t ianswer = json_integer_value (pin);
1709
1710 ret = ANASTASIS_challenge_answer2 (ci,
1711 psp,
1712 timeout,
1713 ianswer,
1714 &answer_feedback_cb,
1715 sctx);
1716 }
1717 else
1718 {
1719 ret = ANASTASIS_challenge_start (ci,
1720 psp,
1721 timeout,
1722 NULL, /* no answer */
1723 &answer_feedback_cb,
1724 sctx);
1725 }
1726 }
1706 if (GNUNET_OK != ret) 1727 if (GNUNET_OK != ret)
1707 { 1728 {
1708 ANASTASIS_redux_fail_ (sctx->cb, 1729 ANASTASIS_redux_fail_ (sctx->cb,