Fix assembling SRT streamid, log output

This commit is contained in:
Ingo Oppermann 2023-06-15 14:22:07 +02:00
parent 83f2954820
commit 7fc547c304
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E
2 changed files with 3 additions and 3 deletions

View File

@ -322,7 +322,7 @@ func (s *server) handleConnect(req srt.ConnRequest) srt.ConnType {
identity, err := s.findIdentityFromToken(si.Token)
if err != nil {
s.logger.Debug().WithError(err).Log("invalid token")
s.log("PUBLISH", "FORBIDDEN", si.Resource, "invalid token", client)
s.log("CONNECT", "FORBIDDEN", si.Resource, "invalid token", client)
return srt.REJECT
}
@ -334,7 +334,7 @@ func (s *server) handleConnect(req srt.ConnRequest) srt.ConnType {
}
if !s.iam.Enforce(identity, domain, resource, action) {
s.log("PUBLISH", "FORBIDDEN", si.Resource, "access denied", client)
s.log("CONNECT", "FORBIDDEN", si.Resource, "access denied", client)
return srt.REJECT
}

View File

@ -89,7 +89,7 @@ type StreamInfo struct {
func (si *StreamInfo) String() string {
streamid := si.Resource
if si.Mode != "request" {
if len(si.Mode) != 0 && si.Mode != "request" {
streamid += ",mode:" + si.Mode
}