Skip to content

Commit

Permalink
fix: correct JSON formatting in broadcast message for port registration
Browse files Browse the repository at this point in the history
  • Loading branch information
dido18 committed Jan 16, 2025
1 parent 894c139 commit 3a34186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serial.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var sh = serialhub{
func (sh *serialhub) Register(port *serport) {
sh.mu.Lock()
//log.Print("Registering a port: ", p.portConf.Name)
h.broadcastSys <- []byte("{\"Cmd\":\"Open\",\"Desc\":\"Got register/open on port.\",\"Port\":\"" + port.portConf.Name + "\",\"Baud\":" + strconv.Itoa(port.portConf.Baud) + "\"}")
h.broadcastSys <- []byte("{\"Cmd\":\"Open\",\"Desc\":\"Got register/open on port.\",\"Port\":\"" + port.portConf.Name + "\",\"Baud\":" + strconv.Itoa(port.portConf.Baud) + "}")
sh.ports[port] = true
sh.mu.Unlock()
}
Expand Down

0 comments on commit 3a34186

Please sign in to comment.