Skip to content

Commit

Permalink
Remove unused array item 'online'
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgarga committed Jun 3, 2019
1 parent ccc6bd4 commit 38897f4
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/usr/local/www/diag_arp.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,9 @@ function remove_duplicate($array, $field) {
break;
case "free":
$leases[$l]['act'] = "expired";
$leases[$l]['online'] = "offline";
break;
case "backup":
$leases[$l]['act'] = "reserved";
$leases[$l]['online'] = "offline";
break;
}
$f = $f+1;
Expand All @@ -171,15 +169,6 @@ function remove_duplicate($array, $field) {
break;
case "hardware":
$leases[$l]['mac'] = $data[$f+2];
/* check if it's online and the lease is active */
if ($leases[$l]['act'] == "active") {
$online = exec("/usr/sbin/arp -an |/usr/bin/awk '/{$leases[$l]['ip']}/ {print}'|wc -l");
if ($online == 1) {
$leases[$l]['online'] = 'online';
} else {
$leases[$l]['online'] = 'offline';
}
}
$f = $f+2;
break;
case "client-hostname":
Expand Down

0 comments on commit 38897f4

Please sign in to comment.