diff --git a/pialert/device.py b/pialert/device.py index a29d9ffc..38308d48 100755 --- a/pialert/device.py +++ b/pialert/device.py @@ -17,6 +17,12 @@ def save_scanned_devices (db, p_arpscan_devices, p_cycle_interval): sql = db.sql #TO-DO cycle = 1 # always 1, only one cycle supported + mylog('debug', ['[ARP Scan] Detected devices:', len(p_arpscan_devices)]) + + p_arpscan_devices = conf.arpscan_devices + + mylog('debug', ['[ARP Scan] Detected devices in conf:', len(p_arpscan_devices)]) + # Delete previous scan data sql.execute ("DELETE FROM CurrentScan WHERE cur_ScanCycle = ?", (cycle,)) diff --git a/pialert/networkscan.py b/pialert/networkscan.py index bf3fa658..1f07b692 100755 --- a/pialert/networkscan.py +++ b/pialert/networkscan.py @@ -77,6 +77,8 @@ def process_scan (db, arpscan_devices): # Load current scan data mylog('verbose','[Process Scan] Processing scan results') save_scanned_devices (db, arpscan_devices, cycle_interval) + + db.commitDB() # Print stats mylog('none','[Process Scan] Print Stats')