projects
/
kmrcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r10174: fix dotted-to-ipaddr
[kmrcl.git]
/
sockets.lisp
diff --git
a/sockets.lisp
b/sockets.lisp
index f105501777be5e122c3cdf012c5c44ff6ca0b1e9..cbadc07c608c70f377e1b28cddeab97552e5b72e 100644
(file)
--- 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 #\.)))
(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 #\.)))
(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)
#+sbcl
(defun ipaddr-to-hostname (ipaddr &key ignore-cache)