X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=sockets.lisp;h=cbadc07c608c70f377e1b28cddeab97552e5b72e;hp=f105501777be5e122c3cdf012c5c44ff6ca0b1e9;hb=e96b017d2a09ffd9c9279cb4c2341c53f0581022;hpb=5cbff06a799c51e2e4bd8644cfca4a64303724a7 diff --git a/sockets.lisp b/sockets.lisp index f105501..cbadc07 100644 --- a/sockets.lisp +++ b/sockets.lisp @@ -133,12 +133,16 @@ setsockopt SO_REUSEADDR if :reuse is not nil" (declare (string dotted)) (if errorp (let ((ll (delimited-string-to-list dotted #\.))) - (+ (ash (first ll) 24) (ash (second ll) 16) - (ash (third ll) 8) (fourth ll))) + (+ (ash (parse-integer (first ll)) 24) + (ash (parse-integer (second ll)) 16) + (ash (parse-integer (third ll)) 8) + (parse-integer (fourth ll)))) (ignore-errors (let ((ll (delimited-string-to-list dotted #\.))) - (+ (ash (first ll) 24) (ash (second ll) 16) - (ash (third ll) 8) (fourth ll)))))) + (+ (ash (parse-integer (first ll)) 24) + (ash (parse-integer (second ll)) 16) + (ash (parse-integer (third ll)) 8) + (parse-integer (fourth ll))))))) #+sbcl (defun ipaddr-to-hostname (ipaddr &key ignore-cache)