Cleanup of ActiveBSSIDs when VIFs table deleted. Fix condition for ClientSession handling

This commit is contained in:
Mike Hansen
2020-07-03 08:46:50 -04:00
parent f904906562
commit 4f6aa7a531

View File

@@ -1479,16 +1479,18 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
LOG.debug("tidStats {}", tidStats); LOG.debug("tidStats {}", tidStats);
} }
try {
if (ssidStatistics.getBssid() != null && ssidStatistics.getSsid() != null }
&& client.getMacAddress() != null) {
handleClientSessionUpdate(customerId, equipmentId, apId, locationId, try {
clientReport.getChannel(), clientReport.getBand(), clientReport.getTimestampMs(), if (ssidStatistics.getBssid() != null && ssid != null
client, report.getNodeID(), ssidStatistics.getBssid(), ssidStatistics.getSsid()); && client.getMacAddress() != null) {
} handleClientSessionUpdate(customerId, equipmentId, apId, locationId,
} catch (Exception e) { clientReport.getChannel(), clientReport.getBand(), clientReport.getTimestampMs(),
LOG.debug("Unabled to update client {} session {}", client, e); client, report.getNodeID(), ssidStatistics.getBssid(), ssid);
} }
} catch (Exception e) {
LOG.debug("Unabled to update client {} session {}", client, e);
} }
} }
@@ -2119,8 +2121,27 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
return; return;
} }
// TODO: if applicable, remove SsidProfiles related to deleted VIF rows Status activeBssidsStatus = statusServiceInterface.getOrNull(customerId, equipmentId,
// for this AP StatusDataType.ACTIVE_BSSIDS);
if (activeBssidsStatus == null) {
return; // nothing to delete
}
ActiveBSSIDs statusDetails = (ActiveBSSIDs) activeBssidsStatus.getDetails();
List<ActiveBSSID> bssidList = statusDetails.getActiveBSSIDs();
bssidList.clear();
statusDetails.setActiveBSSIDs(bssidList);
activeBssidsStatus.setDetails(statusDetails);
statusServiceInterface.update(activeBssidsStatus);
} }
@Override @Override
@@ -2142,9 +2163,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
return; return;
} }
// TODO: update activeBSSDs, etc based on associated clients, client
// information, etc
} }
} }