Skip to content

Commit 7cbd8bf

Browse files
Changed APIFirewallStatesSizeRead.inc to use get_state_table static method from APIFirewallStatesRead.inc
1 parent 28e8e18 commit 7cbd8bf

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

pfSense-pkg-API/files/etc/inc/api/models/APIFirewallStatesSizeRead.inc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@ class APIFirewallStatesSizeRead extends APIModel {
2525
}
2626

2727
public function action() {
28-
29-
// Check our maximum state table size
28+
# Check our maximum state table size
3029
if (isset($this->config["system"]["maximumstates"])) {
3130
$size_array["maximumstates"] = intval($this->config["system"]["maximumstates"]);
3231
} else {
3332
$size_array["maximumstates"] = intval(pfsense_default_state_size());
3433
}
35-
// Check our current state table size
36-
$size_array["currentstates"] = count(APITools\sort_state_table());
37-
// Check our default state table size
34+
# Check our current state table size
35+
$size_array["currentstates"] = count(APIFirewallStatesRead::get_state_table());
36+
# Check our default state table size
3837
$size_array["defaultmaximumstates"] = intval(pfsense_default_state_size());
3938
return APIResponse\get(0, $size_array);
4039
}

0 commit comments

Comments
 (0)