Skip to content

Commit

Permalink
pass o to limit num of args
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Smith (ace hacker) authored and bmizerany committed Mar 26, 2012
1 parent 9ab04ec commit 423884a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func (cn *conn) startup(o Values) {
switch t {
case 'K', 'S':
case 'R':
cn.auth(r, o.Get("password", o.Get("user"))
cn.auth(r, o)
case 'Z':
return
default:
Expand All @@ -280,14 +280,14 @@ func (cn *conn) startup(o Values) {
}
}

func (cn *conn) auth(r *readBuf, p string, u string) {
func (cn *conn) auth(r *readBuf, o Values) {
switch code := r.int32(); code {
case 0:
// OK
case 5:
s := string(r.next(4))
w := newWriteBuf('p')
w.string("md5" + md5s(md5s(p+u)+s))
w.string("md5" + md5s(md5s(o.Get("password")+o.Get("user"))+s))
cn.send(w)

t, r := cn.recv()
Expand Down

0 comments on commit 423884a

Please sign in to comment.