Use new helper functions
This commit is contained in:
parent
0b5d777077
commit
e24a8e9088
3
calls.go
3
calls.go
@ -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 {
|
||||||
|
10
notifs.go
10
notifs.go
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user