Skip to content

Commit

Permalink
Treat form with OC_FORM_OPT_TOKEN as non-empty
Browse files Browse the repository at this point in the history
We're allowed two consecutive forms like this and it isn't indicative of
an endless loop. We *will* be giving different input each time, and giving
up on the automation after two attempts.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jan 30, 2015
1 parent 9690b9d commit ca56129
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.c
Expand Up @@ -1860,6 +1860,11 @@ static int process_auth_form_cb(void *_vpninfo,
if (!opt->_value)
goto err;
empty = 0;
} else if (opt->type == OC_FORM_OPT_TOKEN) {
/* Nothing to do here, but if the tokencode is being
* automatically generated then don't treat it as an
* empty form for the purpose of loop avoidance. */
empty = 0;
}
}

Expand Down

0 comments on commit ca56129

Please sign in to comment.