Debug and attempt for #261

This commit is contained in:
Jokob-sk
2023-06-24 07:55:03 +10:00
parent c61a5bedcf
commit 17f2421836
2 changed files with 8 additions and 0 deletions

View File

@@ -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,))

View File

@@ -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')