mirror of
https://github.com/pion/webrtc.git
synced 2025-12-24 11:51:03 +08:00
Fix misspelled error types
ErrNoTurnCredencials => ErrNoTurnCredentials ErrTurnCredencials => ErrTurnCredentials
This commit is contained in:
committed by
Sean DuBois
parent
d0ec72397e
commit
27f93a7f3d
@@ -37,7 +37,7 @@ func (s ICEServer) urls() ([]*ice.URL, error) {
|
||||
if url.Scheme == ice.SchemeTypeTURN || url.Scheme == ice.SchemeTypeTURNS {
|
||||
// https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3.2)
|
||||
if s.Username == "" || s.Credential == nil {
|
||||
return nil, &rtcerr.InvalidAccessError{Err: ErrNoTurnCredencials}
|
||||
return nil, &rtcerr.InvalidAccessError{Err: ErrNoTurnCredentials}
|
||||
}
|
||||
url.Username = s.Username
|
||||
|
||||
@@ -46,18 +46,18 @@ func (s ICEServer) urls() ([]*ice.URL, error) {
|
||||
// https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3.3)
|
||||
password, ok := s.Credential.(string)
|
||||
if !ok {
|
||||
return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredencials}
|
||||
return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredentials}
|
||||
}
|
||||
url.Password = password
|
||||
|
||||
case ICECredentialTypeOauth:
|
||||
// https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3.4)
|
||||
if _, ok := s.Credential.(OAuthCredential); !ok {
|
||||
return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredencials}
|
||||
return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredentials}
|
||||
}
|
||||
|
||||
default:
|
||||
return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredencials}
|
||||
return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredentials}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user