mirror of
https://github.com/smittix/intercept.git
synced 2026-07-25 01:08:11 -07:00
Fix ADS-B tracking state not reset on kill all processes
The /killall endpoint was not resetting the ADS-B tracking state: - Added dump1090 to the list of processes to kill - Reset adsb_process to None - Reset adsb_using_service flag to False This fixes the "ADS-B tracking already active" error after using kill all processes and trying to start tracking again. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -143,12 +143,16 @@ def get_dependencies() -> Response:
|
|||||||
@app.route('/killall', methods=['POST'])
|
@app.route('/killall', methods=['POST'])
|
||||||
def kill_all() -> Response:
|
def kill_all() -> Response:
|
||||||
"""Kill all decoder and WiFi processes."""
|
"""Kill all decoder and WiFi processes."""
|
||||||
global current_process, sensor_process, wifi_process
|
global current_process, sensor_process, wifi_process, adsb_process
|
||||||
|
|
||||||
|
# Import adsb module to reset its state
|
||||||
|
from routes import adsb as adsb_module
|
||||||
|
|
||||||
killed = []
|
killed = []
|
||||||
processes_to_kill = [
|
processes_to_kill = [
|
||||||
'rtl_fm', 'multimon-ng', 'rtl_433',
|
'rtl_fm', 'multimon-ng', 'rtl_433',
|
||||||
'airodump-ng', 'aireplay-ng', 'airmon-ng'
|
'airodump-ng', 'aireplay-ng', 'airmon-ng',
|
||||||
|
'dump1090'
|
||||||
]
|
]
|
||||||
|
|
||||||
for proc in processes_to_kill:
|
for proc in processes_to_kill:
|
||||||
@@ -168,6 +172,11 @@ def kill_all() -> Response:
|
|||||||
with wifi_lock:
|
with wifi_lock:
|
||||||
wifi_process = None
|
wifi_process = None
|
||||||
|
|
||||||
|
# Reset ADS-B state
|
||||||
|
with adsb_lock:
|
||||||
|
adsb_process = None
|
||||||
|
adsb_module.adsb_using_service = False
|
||||||
|
|
||||||
return jsonify({'status': 'killed', 'processes': killed})
|
return jsonify({'status': 'killed', 'processes': killed})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user