1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-29 13:31:01 +02:00

ID is better than Id according to Golang

This commit is contained in:
Yohann D'ANELLO
2020-10-02 10:33:16 +02:00
parent 12bd0b71e3
commit 8eab4dfe22
2 changed files with 6 additions and 6 deletions

View File

@ -71,20 +71,20 @@ func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet
break // FIXME: should not break here
}
streamId, err := s.GetSockOptString(C.SRTO_STREAMID)
streamID, err := s.GetSockOptString(C.SRTO_STREAMID)
if err != nil {
log.Println("Error while fetching stream key:", err)
s.Close()
continue
}
if !strings.Contains(streamId, "|") {
log.Printf("Warning: stream id must be at the format streamId|password. Input: %s", streamId)
if !strings.Contains(streamID, "|") {
log.Printf("Warning: stream id must be at the format streamID|password. Input: %s", streamID)
s.Close()
continue
}
splittedStreamId := strings.SplitN(streamId, "|", 2)
streamName, password := splittedStreamId[0], splittedStreamId[1]
splittedStreamID := strings.SplitN(streamID, "|", 2)
streamName, password := splittedStreamID[0], splittedStreamID[1]
loggedIn, err := authBackend.Login(streamName, password)
if !loggedIn {
log.Printf("Invalid credentials for stream %s.", streamName)