whitespace and comments

This commit is contained in:
Daniel Barlow 2022-04-07 19:12:45 +01:00
parent 463c1eea03
commit 280954622d
2 changed files with 4 additions and 6 deletions

View File

@ -71,17 +71,15 @@
"no" event)) "no" event))
{:event :newroute} {: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) ;; (e.g wwan and wlan both have default route)
;; we probably need to store all of them and ;; so we only update the routes table if the
;; distinguish by metric ;; metric is lower
(let [dst (or event.dst "default") (let [dst (or event.dst "default")
existing (. routes dst)] existing (. routes dst)]
(if (or (not existing) (if (or (not existing)
(< event.metric existing.metric)) (< event.metric existing.metric))
(tset routes dst event))) (tset routes dst event)))
{} (print :unhandled event.event)
)) ))
(each [_ event (ipairs (sock:query ))] (each [_ event (ipairs (sock:query ))]
(handle-event event)) (handle-event event))

View File

@ -6,7 +6,7 @@
;; https://www.freedesktop.org/software/ModemManager/api/latest/ref-dbus.html ;; https://www.freedesktop.org/software/ModemManager/api/latest/ref-dbus.html
(fn modem-manager [] (fn modem-manager []
(dbus.Proxy:new (dbus.Proxy:new
{ {
:bus dbus.Bus.SYSTEM :bus dbus.Bus.SYSTEM