From e96b017d2a09ffd9c9279cb4c2341c53f0581022 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 28 Nov 2004 20:15:20 +0000 Subject: [PATCH] r10174: fix dotted-to-ipaddr --- sockets.lisp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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) -- 2.34.1