Consolidate backend scanner status, paging, and query-param duplication

Add ActiveStatusCell/PassiveStatusCell wrappers in the scanners common
module so the five per-scanner status.rs files reduce to a single static;
replace parse_parameter_bool/int/string with one generic parse_parameter
over FromStr; extract the shared LIMIT/OFFSET paging clause into
db::apply_paging; and drop a no-op for-loop in the ARP sender.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-06-06 09:03:00 -04:00
co-authored by Claude Opus 4.8
parent c022e672d1
commit 8749ff33c1
27 changed files with 189 additions and 260 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ pub async fn listen() -> Result<(), Box<dyn std::error::Error>> {
let interface = get_settings().networking.interface.clone();
let socket = finder::open_socket(interface.clone())?;
status::set_listening();
status::STATUS.set_listening();
info!("SSDP scanner listening for announcements");
let probe_timeout = Duration::from(get_settings().ssdp_scanner.probe_timeout);
@@ -77,5 +77,5 @@ async fn process_announcement(
let device = build_device(mac.clone(), src_ip.to_string(), &device_types, server_hint);
pipeline::record_sighting(device, DeviceEventScanner::Ssdp);
status::record_discovery(&mac);
status::STATUS.record_discovery(&mac);
}