branch: elpa/pg
commit 1ef7e708f934a63fee166780c69b7429ac11348d
Author: Eric Marsden <[email protected]>
Commit: Eric Marsden <[email protected]>

    Allow for longer secret data in BackendKeyData (v3.2 protocol)
---
 pg.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pg.el b/pg.el
index d93cc8ca8c7..69cfab9c10b 100644
--- a/pg.el
+++ b/pg.el
@@ -1462,9 +1462,9 @@ Return a result structure which can be decoded using 
`pg-result'."
 
             ;; BackendKeyData
             (?K
-             (let ((_msglen (pg-read-net-int con 4)))
+             (let ((msglen (pg-read-net-int con 4)))
                (setf (pgcon-pid con) (pg-read-net-int con 4))
-               (setf (pgcon-secret con) (pg-read-net-int con 4))))
+               (setf (pgcon-secret con) (pg-read-chars con (- msglen 8)))))
 
             ;; NoticeResponse
             (?N

Reply via email to