Skip to content

Commit

Permalink
Merge pull request #5 from cuu/master
Browse files Browse the repository at this point in the history
fix for ParseCallAdded
  • Loading branch information
maltegrosse authored Nov 14, 2022
2 parents a70df96 + 961de8d commit 8420f1b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ModemVoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"encoding/json"
"errors"
"fmt"
"strings"

"github.com/godbus/dbus/v5"
)

Expand Down Expand Up @@ -232,7 +234,11 @@ func (m modemVoice) SubscribeCallDeleted() <-chan *dbus.Signal {
}

func (m modemVoice) ParseCallAdded(v *dbus.Signal) (call Call, err error) {
// todo untested

if strings.Contains(v.Name, ModemVoiceSignalCallAdded) == false {
return nil, errors.New("error by parsing calladded signal")
}

if len(v.Body) != 1 {
err = errors.New("error by parsing activation changed signal")
return
Expand Down

0 comments on commit 8420f1b

Please sign in to comment.