Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions icecandidate.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,38 @@
candidates := []ICECandidate{}

for _, i := range iceCandidates {
if i.Type() == ice.CandidateTypeHost {
hostCandidate := i.(*ice.CandidateHost)
if len(hostCandidate.Addresses()) > 0 {

Check failure on line 41 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.24) / Go 1.24

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 41 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.24) / Go 1.24

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 41 in icecandidate.go

View workflow job for this annotation

GitHub Actions / lint / Go

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 41 in icecandidate.go

View workflow job for this annotation

GitHub Actions / lint / Go

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 41 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.23) / Go 1.23

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 41 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.23) / Go 1.23

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)
// no related address for host candidate
for j := range hostCandidate.Addresses() {

Check failure on line 43 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.24) / Go 1.24

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 43 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.24) / Go 1.24

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 43 in icecandidate.go

View workflow job for this annotation

GitHub Actions / lint / Go

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 43 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.23) / Go 1.23

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 43 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.23) / Go 1.23

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)
cfg := ice.CandidateHostConfig{
Network: hostCandidate.NetworkType().NetworkShort(),
Address: hostCandidate.Addresses()[j],

Check failure on line 46 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.24) / Go 1.24

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 46 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.24) / Go 1.24

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 46 in icecandidate.go

View workflow job for this annotation

GitHub Actions / lint / Go

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 46 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.23) / Go 1.23

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)

Check failure on line 46 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.23) / Go 1.23

hostCandidate.Addresses undefined (type *ice.CandidateHost has no field or method Addresses)
Port: hostCandidate.Ports()[j],

Check failure on line 47 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.24) / Go 1.24

hostCandidate.Ports undefined (type *ice.CandidateHost has no field or method Ports)

Check failure on line 47 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.24) / Go 1.24

hostCandidate.Ports undefined (type *ice.CandidateHost has no field or method Ports)

Check failure on line 47 in icecandidate.go

View workflow job for this annotation

GitHub Actions / lint / Go

hostCandidate.Ports undefined (type *ice.CandidateHost has no field or method Ports)) (typecheck)

Check failure on line 47 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.23) / Go 1.23

hostCandidate.Ports undefined (type *ice.CandidateHost has no field or method Ports)

Check failure on line 47 in icecandidate.go

View workflow job for this annotation

GitHub Actions / test (1.23) / Go 1.23

hostCandidate.Ports undefined (type *ice.CandidateHost has no field or method Ports)
Component: hostCandidate.Component(),
Priority: hostCandidate.Priority(),
Foundation: hostCandidate.Foundation(),
TCPType: hostCandidate.TCPType(),
}
newHostCandidate, err := ice.NewCandidateHost(&cfg)
if err != nil {
return nil, err
}
for _, ext := range hostCandidate.Extensions() {
if err := newHostCandidate.AddExtension(ext); err != nil {
return nil, err
}
}
c, err := newICECandidateFromICE(newHostCandidate, sdpMid, sdpMLineIndex)
if err != nil {
return nil, err
}
candidates = append(candidates, c)
}
continue
}
}
c, err := newICECandidateFromICE(i, sdpMid, sdpMLineIndex)
if err != nil {
return nil, err
Expand Down
Loading