Update NodeWireless entries which match both MAC and SSID found, only

This commit is contained in:
Oliver Gorwits
2013-09-25 16:08:07 +01:00
parent 23301e9f1e
commit 4d6b1f6ed4
2 changed files with 9 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
2.017001 -
[BUG FIXES]
* Update NodeWireless entries which match both MAC and SSID found, only
2.017000 - 2013-09-23
[NEW FEATURES]

View File

@@ -455,9 +455,11 @@ sub store_wireless_client_info {
? int($rates->[$#$rates])
: undef;
my $ssid = $cd11_ssid->{$idx} || 'unknown';
schema('netdisco')->txn_do(sub {
schema('netdisco')->resultset('NodeWireless')
->search({ 'me.mac' => $mac })
->search({ 'me.mac' => $mac, 'me.ssid' => $ssid })
->update_or_create({
txrate => $txrate,
maxrate => $maxrate,
@@ -468,7 +470,6 @@ sub store_wireless_client_info {
txbyte => $cd11_txbyte->{$idx},
sigqual => $cd11_sigqual->{$idx},
sigstrength => $cd11_sigstrength->{$idx},
ssid => ($cd11_ssid->{$idx} || 'unknown'),
time_last => \$now,
}, {
order_by => [qw/mac ssid/],