HS 2.0: Fix T&C server database check
It was possible for the wait loop to exit early due to the $row[0] == 1 check returning false if the database value was not yet set. Fix this by updated the $waiting default value only if the database actually has a value for this field. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
25f3c270d9
commit
1d73531fdb
1 changed files with 4 additions and 2 deletions
|
@ -59,7 +59,9 @@ if (!$accept) {
|
|||
if (!$row) {
|
||||
die("No current session for the specified MAC address");
|
||||
}
|
||||
if (strlen($row[0]) > 0)
|
||||
$waiting = $row[0] == 1;
|
||||
if (strlen($row[1]) > 0)
|
||||
$ack = $row[1] == 1;
|
||||
$res->closeCursor();
|
||||
if (!$waiting)
|
||||
|
|
Loading…
Reference in a new issue