summaryrefslogtreecommitdiff
path: root/databases/godis/files/patch-conn.go
diff options
context:
space:
mode:
authorMichael Scheidell <scheidell@FreeBSD.org>2012-01-19 01:53:50 +0000
committerMichael Scheidell <scheidell@FreeBSD.org>2012-01-19 01:53:50 +0000
commit80b3fb6c85f4858e3b1dc9b8f4cf02187405d521 (patch)
tree5bdcb663d7022c4aa39ffda95ed86341bce21819 /databases/godis/files/patch-conn.go
parent- Update to 1.0.16. (diff)
- Fixed authenticaton to database != 0
PR: ports/164295 Submitted by: maintainer Approved by: gabor (maintainer, implicit)
Notes
Notes: svn path=/head/; revision=289434
Diffstat (limited to 'databases/godis/files/patch-conn.go')
-rw-r--r--databases/godis/files/patch-conn.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/databases/godis/files/patch-conn.go b/databases/godis/files/patch-conn.go
new file mode 100644
index 000000000000..2ebb27bcd9d1
--- /dev/null
+++ b/databases/godis/files/patch-conn.go
@@ -0,0 +1,24 @@
+--- conn.go.orig 2011-09-04 22:00:03.000000000 +0200
++++ conn.go 2012-01-18 21:31:25.000000000 +0100
+@@ -342,8 +342,8 @@
+ }
+
+ func (cc *conn) configConn(db int, password string) os.Error {
+- if db != 0 {
+- buf := [][]byte{[]byte("SELECT"), []byte(strconv.Itoa(db))}
++ if password != "" {
++ buf := [][]byte{[]byte("AUTH"), []byte(password)}
+ _, err := cc.rwc.Write(buildCmd(buf))
+
+ if err != nil {
+@@ -356,8 +356,8 @@
+ }
+ }
+
+- if password != "" {
+- buf := [][]byte{[]byte("AUTH"), []byte(password)}
++ if db != 0 {
++ buf := [][]byte{[]byte("SELECT"), []byte(strconv.Itoa(db))}
+ _, err := cc.rwc.Write(buildCmd(buf))
+
+ if err != nil { \ No newline at end of file