mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -04:00
Update calls to session description utils in proxy
This commit is contained in:
parent
047d3214bf
commit
1d2df3cd71
1 changed files with 11 additions and 2 deletions
|
@ -200,7 +200,13 @@ func (b *Broker) pollOffer(sid string) *webrtc.SessionDescription {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if offer != "" {
|
if offer != "" {
|
||||||
return util.DeserializeSessionDescription(offer)
|
offer, err := util.DeserializeSessionDescription(offer)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Error processing session description: %s", err.Error())
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return offer
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -217,7 +223,10 @@ func (b *Broker) sendAnswer(sid string, pc *webrtc.PeerConnection) error {
|
||||||
SDP: util.StripLocalAddresses(ld.SDP),
|
SDP: util.StripLocalAddresses(ld.SDP),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
answer := string([]byte(util.SerializeSessionDescription(ld)))
|
answer, err := util.SerializeSessionDescription(ld)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
body, err := messages.EncodeAnswerRequest(answer, sid)
|
body, err := messages.EncodeAnswerRequest(answer, sid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue