wpa_cli: Add newline to end of responses in interactive mode
Some of the wpa_supplicant control interface commands, like WPS_PIN, may not include a newline in the end of the response. This can result in the response being lost when wpa_cli redraws the screen after an event message. Add a newline after such responses in interactive mode to avoid the problem.
This commit is contained in:
parent
e4ac6417c7
commit
a432bafbca
1 changed files with 2 additions and 0 deletions
|
@ -254,6 +254,8 @@ static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, char *cmd, int print)
|
||||||
if (print) {
|
if (print) {
|
||||||
buf[len] = '\0';
|
buf[len] = '\0';
|
||||||
printf("%s", buf);
|
printf("%s", buf);
|
||||||
|
if (interactive && len > 0 && buf[len - 1] != '\n')
|
||||||
|
printf("\n");
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue