projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r10155: 11 Nov 2004 Kevin Rosenberg <kevin@rosenberg.net>
[clsql.git]
/
db-postgresql-socket
/
postgresql-socket-api.lisp
diff --git
a/db-postgresql-socket/postgresql-socket-api.lisp
b/db-postgresql-socket/postgresql-socket-api.lisp
index 620140ee718c0872aab75515bba8a0db4a2ad699..7ad32362f2c86da708aebc53d6a83de6100c6939 100644
(file)
--- a/
db-postgresql-socket/postgresql-socket-api.lisp
+++ b/
db-postgresql-socket/postgresql-socket-api.lisp
@@
-27,13
+27,13
@@
(:float4 700)
(:float8 701)))
(:float4 700)
(:float8 701)))
-(defmethod clsql-
base
:database-type-library-loaded ((database-type
+(defmethod clsql-
sys
:database-type-library-loaded ((database-type
(eql :postgresql-socket)))
"T if foreign library was able to be loaded successfully. Always true for
socket interface"
t)
(eql :postgresql-socket)))
"T if foreign library was able to be loaded successfully. Always true for
socket interface"
t)
-(defmethod clsql-
base
:database-type-load-foreign ((database-type (eql :postgresql-socket)))
+(defmethod clsql-
sys
:database-type-load-foreign ((database-type (eql :postgresql-socket)))
t)
t)
@@
-214,7
+214,7
@@
socket interface"
;;; Support for encrypted password transmission
#-scl
;;; Support for encrypted password transmission
#-scl
-(eval-when (
compile eval load
)
+(eval-when (
:compile-toplevel :load-toplevel :execute
)
(defvar *crypt-library-loaded* nil)
(unless *crypt-library-loaded*
(defvar *crypt-library-loaded* nil)
(unless *crypt-library-loaded*
@@
-426,7
+426,7
@@
troubles."
(defun encrypt-md5 (plaintext salt)
(string-downcase
(format nil "~{~2,'0X~}"
(defun encrypt-md5 (plaintext salt)
(string-downcase
(format nil "~{~2,'0X~}"
- (coerce (md5
:md5
sum-sequence (concatenate 'string plaintext salt)) 'list))))
+ (coerce (md5sum-sequence (concatenate 'string plaintext salt)) 'list))))
(defun reopen-postgresql-connection (connection)
"Reopen the given PostgreSQL connection. Closes any existing
(defun reopen-postgresql-connection (connection)
"Reopen the given PostgreSQL connection. Closes any existing
@@
-458,14
+458,16
@@
connection, if it is still open."
(3
(send-unencrypted-password-message
socket
(3
(send-unencrypted-password-message
socket
- (postgresql-connection-password connection)))
+ (postgresql-connection-password connection))
+ (force-output socket))
(4
(let ((salt (make-string 2)))
(read-socket-sequence salt socket)
(send-encrypted-password-message
socket
(crypt-password
(4
(let ((salt (make-string 2)))
(read-socket-sequence salt socket)
(send-encrypted-password-message
socket
(crypt-password
- (postgresql-connection-password connection) salt))))
+ (postgresql-connection-password connection) salt)))
+ (force-output socket))
(5
(let ((salt (make-string 4)))
(read-socket-sequence salt socket)
(5
(let ((salt (make-string 4)))
(read-socket-sequence salt socket)
@@
-474,7
+476,8
@@
connection, if it is still open."
(pwd (encrypt-md5 pwd2 salt)))
(send-encrypted-password-message
socket
(pwd (encrypt-md5 pwd2 salt)))
(send-encrypted-password-message
socket
- (concatenate 'string "md5" pwd)))))
+ (concatenate 'string "md5" pwd))))
+ (force-output socket))
(t
(error 'postgresql-login-error
:connection connection
(t
(error 'postgresql-login-error
:connection connection
@@
-601,7
+604,7
@@
connection, if it is still open."
:connection connection :message message))))
(#.+notice-response-message+
(let ((message (read-socket-value-string socket)))
:connection connection :message message))))
(#.+notice-response-message+
(let ((message (read-socket-value-string socket)))
- (unless (eq :ignore clsql-
base
:*backend-warning-behavior*)
+ (unless (eq :ignore clsql-
sys
:*backend-warning-behavior*)
(warn 'postgresql-warning
:connection connection :message message))))
(#.+notification-response-message+
(warn 'postgresql-warning
:connection connection :message message))))
(#.+notification-response-message+