mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-06-02 05:52:18 +02:00
Don't cast bytes to string but use "String()" method.
This commit is contained in:
parent
6ffed30ddc
commit
7d874ac1a7
|
@ -430,13 +430,13 @@ func (gateway *JanusGateway) recv() {
|
||||||
decoder := json.NewDecoder(data)
|
decoder := json.NewDecoder(data)
|
||||||
decoder.UseNumber()
|
decoder.UseNumber()
|
||||||
if err := decoder.Decode(&base); err != nil {
|
if err := decoder.Decode(&base); err != nil {
|
||||||
log.Printf("json.Unmarshal of %s: %s", string(decodeBuffer.Bytes()), err)
|
log.Printf("json.Unmarshal of %s: %s", decodeBuffer.String(), err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
typeFunc, ok := msgtypes[base.Type]
|
typeFunc, ok := msgtypes[base.Type]
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Printf("Unknown message type received: %s", string(decodeBuffer.Bytes()))
|
log.Printf("Unknown message type received: %s", decodeBuffer.String())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,7 +445,7 @@ func (gateway *JanusGateway) recv() {
|
||||||
decoder = json.NewDecoder(data)
|
decoder = json.NewDecoder(data)
|
||||||
decoder.UseNumber()
|
decoder.UseNumber()
|
||||||
if err := decoder.Decode(&msg); err != nil {
|
if err := decoder.Decode(&msg); err != nil {
|
||||||
log.Printf("json.Unmarshal of %s: %s", string(decodeBuffer.Bytes()), err)
|
log.Printf("json.Unmarshal of %s: %s", decodeBuffer.String(), err)
|
||||||
continue // Decode error
|
continue // Decode error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,7 +461,7 @@ func (gateway *JanusGateway) recv() {
|
||||||
session := gateway.Sessions[base.Session]
|
session := gateway.Sessions[base.Session]
|
||||||
gateway.Unlock()
|
gateway.Unlock()
|
||||||
if session == nil {
|
if session == nil {
|
||||||
log.Printf("Unable to deliver message %s. Session %d gone?", string(decodeBuffer.Bytes()), base.Session)
|
log.Printf("Unable to deliver message %s. Session %d gone?", decodeBuffer.String(), base.Session)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -470,7 +470,7 @@ func (gateway *JanusGateway) recv() {
|
||||||
handle := session.Handles[base.Handle]
|
handle := session.Handles[base.Handle]
|
||||||
session.Unlock()
|
session.Unlock()
|
||||||
if handle == nil {
|
if handle == nil {
|
||||||
log.Printf("Unable to deliver message %s. Handle %d gone?", string(decodeBuffer.Bytes()), base.Handle)
|
log.Printf("Unable to deliver message %s. Handle %d gone?", decodeBuffer.String(), base.Handle)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue