whitespace and comments

phoen
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))
{: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))

View File

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