Commit 917fa33d authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't duplicate username in call to addClient.

parent 208f023d
......@@ -203,13 +203,13 @@ type userid struct {
username string
}
func addClient(name string, c client, user, pass string) (*group, error) {
func addClient(name string, c client, pass string) (*group, error) {
g, err := addGroup(name, nil)
if err != nil {
return nil, err
}
perms, err := getPermission(g.description, user, pass)
perms, err := getPermission(g.description, c.Username(), pass)
if err != nil {
return nil, err
}
......
......@@ -647,7 +647,7 @@ func startClient(conn *websocket.Conn) (err error) {
c.writerDone = make(chan struct{})
go clientWriter(conn, c.writeCh, c.writerDone)
g, err := addClient(m.Group, c, m.Username, m.Password)
g, err := addClient(m.Group, c, m.Password)
if err != nil {
return
}
......@@ -975,7 +975,7 @@ func handleClientMessage(c *webClient, m clientMessage) error {
group: c.group,
id: "recording",
}
_, err := addClient(c.group.name, disk, "", "")
_, err := addClient(c.group.name, disk, "")
if err != nil {
disk.Close()
return c.error(err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment