DescriptionFixing off-by-one error with max SCTP id.
Normally, when creating a data channel with an out-of-range ID,
createDataChannel returns nullptr. But due to an off-by-one
error, creating a data channel with ID 1023 returns a data channel
that silently fails later.
This probably occurred because it wasn't clear whether "kMaxSctpSid" was an
inclusive or exclusive maximum, so I changed the value to
"kMaxSctpStreams". This wasn't caught by unit tests because the
off-by-one error persisted to the unit tests as well.
Also getting rid of some dead code. We were adding SCTP streams to the
ContentDescription object but they weren't being used.
BUG=619849
R=pthatcher@webrtc.org, skvlad@webrtc.org
Committed: https://crrev.com/1d7a637340ea097ea55061af7b566ceccc2678c8
Cr-Commit-Position: refs/heads/master@{#13906}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Removing unneeded parentheses. #
Total comments: 4
Messages
Total messages: 19 (9 generated)
|