mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
TEST: Upgrade pion to v3.2.9. (#3567)
------ Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
parent
104cf14d68
commit
df854339ea
1383 changed files with 118469 additions and 41421 deletions
14
trunk/3rdparty/srs-bench/vendor/github.com/pion/stun/checks.go
generated
vendored
14
trunk/3rdparty/srs-bench/vendor/github.com/pion/stun/checks.go
generated
vendored
|
@ -1,8 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
//go:build !debug
|
||||
// +build !debug
|
||||
|
||||
package stun
|
||||
|
||||
import "github.com/pion/stun/internal/hmac"
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/pion/stun/internal/hmac"
|
||||
)
|
||||
|
||||
// CheckSize returns ErrAttrSizeInvalid if got is not equal to expected.
|
||||
func CheckSize(_ AttrType, got, expected int) error {
|
||||
|
@ -28,7 +36,7 @@ func checkFingerprint(got, expected uint32) error {
|
|||
|
||||
// IsAttrSizeInvalid returns true if error means that attribute size is invalid.
|
||||
func IsAttrSizeInvalid(err error) bool {
|
||||
return err == ErrAttributeSizeInvalid
|
||||
return errors.Is(err, ErrAttributeSizeInvalid)
|
||||
}
|
||||
|
||||
// CheckOverflow returns ErrAttributeSizeOverflow if got is bigger that max.
|
||||
|
@ -41,5 +49,5 @@ func CheckOverflow(_ AttrType, got, max int) error {
|
|||
|
||||
// IsAttrSizeOverflow returns true if error means that attribute size is too big.
|
||||
func IsAttrSizeOverflow(err error) bool {
|
||||
return err == ErrAttributeSizeOverflow
|
||||
return errors.Is(err, ErrAttributeSizeOverflow)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue