GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 1d2df3cd authored by Cecylia Bocovich's avatar Cecylia Bocovich

Update calls to session description utils in proxy

parent 047d3214
......@@ -200,7 +200,13 @@ func (b *Broker) pollOffer(sid string) *webrtc.SessionDescription {
return nil
}
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),
}
}
answer := string([]byte(util.SerializeSessionDescription(ld)))
answer, err := util.SerializeSessionDescription(ld)
if err != nil {
return err
}
body, err := messages.EncodeAnswerRequest(answer, sid)
if err != nil {
return err
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment