The value GETHASH is not of type (UNSIGNED-BYTE 8)
Posted: Sat Dec 10, 2016 3:24 am
Hello,
I try to use SNMP module (QuickLisp installation). I have a problem with data type for :md5 parameter:
SBCL tells: The value GETHASH is not of type (UNSIGNED-BYTE 8)
If I try to use this code, it works:
In this case a type of "PaSsWoRd" is (SIMPLE-ARRAY CHARACTER (8)) and if I check a type of (gethash "PASSWORD" hash) it tells me also (SIMPLE-ARRAY CHARACTER (8)). So data types are same, but in case of hash-table it doesn't work!
Does anybody know how to fix it? What exactly returns SBCL by calling gethash and why :md5 doesn't accept it?
Thank you!
I try to use SNMP module (QuickLisp installation). I have a problem with data type for :md5 parameter:
Code: Select all
(defun get-info (hash)
(format t "~A~%" (type-of (gethash "PASSWORD" hash)))
(format t "~A~%"
(snmp:with-open-session
(s (gethash "HOST" hash)
:user (gethash "USERNAME" hash)
:auth '(:md5 (gethash "PASSWORD" hash))) <-- here
(snmp:snmp-walk s (gethash "OPTION" hash)))))
If I try to use this code, it works:
Code: Select all
(defun get-info (hash)
(format t "~A~%"
(snmp:with-open-session
(s (gethash "HOST" hash)
:user (gethash "USERNAME" hash)
:auth '(:md5 "PaSsWoRd"))
(snmp:snmp-walk s (gethash "OPTION" hash)))))
Does anybody know how to fix it? What exactly returns SBCL by calling gethash and why :md5 doesn't accept it?
Thank you!