commit 280954622d5a3365274ce63b54677efb4756dd6f
parent 463c1eea030921cb77c93dda680e43268fe81ca1
Author: Daniel Barlow <dan@telent.net>
Date: Thu, 7 Apr 2022 19:12:45 +0100
whitespace and comments
Diffstat:
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/blinkenlicht/metric/uplink.fnl b/blinkenlicht/metric/uplink.fnl
@@ -71,17 +71,15 @@
"no" event))
{:event :newroute}
- ;; XXX there may be >1 route to any given destination,
+ ;; there may be >1 route to any given destination,
;; (e.g wwan and wlan both have default route)
- ;; we probably need to store all of them and
- ;; distinguish by metric
+ ;; so we only update the routes table if the
+ ;; metric is lower
(let [dst (or event.dst "default")
existing (. routes dst)]
(if (or (not existing)
(< event.metric existing.metric))
(tset routes dst event)))
-
- {} (print :unhandled event.event)
))
(each [_ event (ipairs (sock:query ))]
(handle-event event))
diff --git a/blinkenlicht/modem.fnl b/blinkenlicht/modem.fnl
@@ -6,7 +6,7 @@
;; https://www.freedesktop.org/software/ModemManager/api/latest/ref-dbus.html
-(fn modem-manager []
+(fn modem-manager []
(dbus.Proxy:new
{
:bus dbus.Bus.SYSTEM