mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Don't duplicate username in call to addClient.
This commit is contained in:
parent
208f023d9e
commit
917fa33d38
2 changed files with 4 additions and 4 deletions
4
group.go
4
group.go
|
@ -203,13 +203,13 @@ type userid struct {
|
||||||
username string
|
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)
|
g, err := addGroup(name, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
perms, err := getPermission(g.description, user, pass)
|
perms, err := getPermission(g.description, c.Username(), pass)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -647,7 +647,7 @@ func startClient(conn *websocket.Conn) (err error) {
|
||||||
c.writerDone = make(chan struct{})
|
c.writerDone = make(chan struct{})
|
||||||
go clientWriter(conn, c.writeCh, c.writerDone)
|
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 {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -975,7 +975,7 @@ func handleClientMessage(c *webClient, m clientMessage) error {
|
||||||
group: c.group,
|
group: c.group,
|
||||||
id: "recording",
|
id: "recording",
|
||||||
}
|
}
|
||||||
_, err := addClient(c.group.name, disk, "", "")
|
_, err := addClient(c.group.name, disk, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
disk.Close()
|
disk.Close()
|
||||||
return c.error(err)
|
return c.error(err)
|
||||||
|
|
Loading…
Reference in a new issue