summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/agent.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/agent.c b/client/agent.c
index 780104bd..12b0a984 100644
--- a/client/agent.c
+++ b/client/agent.c
@@ -418,11 +418,19 @@ static void request_input_ssid_return(char *input,
static void request_input_passphrase_return(char *input, void *user_data)
{
struct agent_data *request = user_data;
+ int len = 0;
/* TBD passphrase length checking */
- if (input != NULL && strlen(input) > 0) {
- request->input[PASSPHRASE].requested = false;
+ if (input != NULL)
+ len = strlen(input);
+
+ if (len == 0 && request->input[WPS].requested == false)
+ return;
+
+ request->input[PASSPHRASE].requested = false;
+
+ if (len > 0) {
request_input_append(request,
request->input[PASSPHRASE].attribute, input);