Use new helper functions

This commit is contained in:
Elara 2021-11-24 11:52:52 -08:00
parent 715a53a91c
commit 62817e4fbe
2 changed files with 1 additions and 12 deletions

View File

@ -7,9 +7,6 @@ import (
) )
func initCallNotifs(dev *infinitime.Device) error { func initCallNotifs(dev *infinitime.Device) error {
// Define rule to filter dbus messages
//rule := "type='signal',sender='org.freedesktop.ModemManager1',interface='org.freedesktop.ModemManager1.Modem.Voice',member='CallAdded'"
// Connect to dbus session monitorConn // Connect to dbus session monitorConn
monitorConn, err := newSystemBusConn() monitorConn, err := newSystemBusConn()
if err != nil { if err != nil {

View File

@ -30,15 +30,7 @@ import (
func initNotifRelay(dev *infinitime.Device) error { func initNotifRelay(dev *infinitime.Device) error {
// Connect to dbus session bus // Connect to dbus session bus
bus, err := dbus.SessionBusPrivate() bus, err := newSessionBusConn()
if err != nil {
return err
}
err = bus.Auth(nil)
if err != nil {
return err
}
err = bus.Hello()
if err != nil { if err != nil {
return err return err
} }