This commit is contained in:
qowevisa 2024-06-12 22:38:26 +03:00
parent 7c6a7e4292
commit f8a67121e7
2 changed files with 2 additions and 2 deletions

View File

@ -206,7 +206,7 @@ func readFromWebSocket(conn net.Conn, ws *websocket.Conn) {
switch msg.ID {
case com.ID_CLIENT_ASK_CLIENT_HANDSHAKE,
com.ID_CLIENT_APPROVE_CLIENT_HANDSHAKE:
err := tlepCenter.AddUser(msg.ToID, fmt.Sprintf("%s-%d", r.Name, msg.ToID))
err := tlepCenter.AddTLEP(msg.ToID, fmt.Sprintf("%s-%d", r.Name, msg.ToID))
if err != nil {
log.Printf("ERROR: tlepCenter.AddUser: %v\n", err)
}

View File

@ -27,7 +27,7 @@ var (
ERROR_DONT_HAVE = errors.New("Not found")
)
func (t *TlepCenter) AddUser(id uint16, name string) error {
func (t *TlepCenter) AddTLEP(id uint16, name string) error {
t.Mu.Lock()
defer t.Mu.Unlock()
_, alreadyHave := t.TLEPs[id]