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,8 +59,10 @@ if (!$accept) {
|
||||||
if (!$row) {
|
if (!$row) {
|
||||||
die("No current session for the specified MAC address");
|
die("No current session for the specified MAC address");
|
||||||
}
|
}
|
||||||
$waiting = $row[0] == 1;
|
if (strlen($row[0]) > 0)
|
||||||
$ack = $row[1] == 1;
|
$waiting = $row[0] == 1;
|
||||||
|
if (strlen($row[1]) > 0)
|
||||||
|
$ack = $row[1] == 1;
|
||||||
$res->closeCursor();
|
$res->closeCursor();
|
||||||
if (!$waiting)
|
if (!$waiting)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue