From 280954622d5a3365274ce63b54677efb4756dd6f Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Thu, 7 Apr 2022 19:12:45 +0100 Subject: [PATCH] whitespace and comments --- blinkenlicht/metric/uplink.fnl | 8 +++----- blinkenlicht/modem.fnl | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/blinkenlicht/metric/uplink.fnl b/blinkenlicht/metric/uplink.fnl index 02c8822..96c740a 100644 --- 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 index 48fd27f..f2f1c27 100644 --- 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