[usocket-cvs] r166 - in usocket/branches/0.2.x: . backend

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Tue Jan 16 23:14:51 UTC 2007


Author: ehuelsmann
Date: Tue Jan 16 18:14:50 2007
New Revision: 166

Modified:
   usocket/branches/0.2.x/backend/allegro.lisp
   usocket/branches/0.2.x/backend/lispworks.lisp
   usocket/branches/0.2.x/backend/openmcl.lisp
   usocket/branches/0.2.x/usocket.lisp
Log:
Backport r 162:165 (DNS query function fixes).

Modified: usocket/branches/0.2.x/backend/allegro.lisp
==============================================================================
--- usocket/branches/0.2.x/backend/allegro.lisp	(original)
+++ usocket/branches/0.2.x/backend/allegro.lisp	Tue Jan 16 18:14:50 2007
@@ -75,11 +75,12 @@
 
 (defun get-host-by-address (address)
   (with-mapped-conditions ()
-    (socket:ipaddr-to-hostname address)))
+    (socket:ipaddr-to-hostname (host-to-hbo address))))
 
 (defun get-hosts-by-name (name)
   ;;###FIXME: ACL has the acldns module which returns all A records
   ;; only problem: it doesn't fall back to tcp (from udp) if the returned
   ;; structure is too long.
   (with-mapped-conditions ()
-    (list (hbo-to-vector-quad (socket:lookup-hostname name)))))
+    (list (hbo-to-vector-quad (socket:lookup-hostname
+                               (host-to-hostname name)))))

Modified: usocket/branches/0.2.x/backend/lispworks.lisp
==============================================================================
--- usocket/branches/0.2.x/backend/lispworks.lisp	(original)
+++ usocket/branches/0.2.x/backend/lispworks.lisp	Tue Jan 16 18:14:50 2007
@@ -91,4 +91,5 @@
 
 (defun get-hosts-by-name (name)
   (with-mapped-conditions ()
-     (comm:get-host-entry name :fields '(:addresses))))
+     (mapcar #'hbo-to-vector-quad
+             (comm:get-host-entry name :fields '(:addresses)))))

Modified: usocket/branches/0.2.x/backend/openmcl.lisp
==============================================================================
--- usocket/branches/0.2.x/backend/openmcl.lisp	(original)
+++ usocket/branches/0.2.x/backend/openmcl.lisp	Tue Jan 16 18:14:50 2007
@@ -74,3 +74,12 @@
 (defmethod get-peer-name ((usocket usocket))
   (values (get-peer-address usocket)
           (get-peer-port usocket)))
+
+(defun get-host-by-address (address)
+  (with-mapped-conditions ()
+     (openmcl-socket:ipaddr-to-hostname (host-to-hbo address))))
+
+(defun get-hosts-by-name (name)
+  (with-mapped-conditions ()
+     (list (hbo-to-vector-quad (openmcl-socket:lookup-hostname
+                                (host-to-hostname name))))))

Modified: usocket/branches/0.2.x/usocket.lisp
==============================================================================
--- usocket/branches/0.2.x/usocket.lisp	(original)
+++ usocket/branches/0.2.x/usocket.lisp	Tue Jan 16 18:14:50 2007
@@ -143,7 +143,7 @@
 ;; DNS helper functions
 ;;
 
-#-(or clisp openmcl armedbear)
+#-(or clisp armedbear)
 (progn
   (defun get-host-by-name (name)
     (let ((hosts (get-hosts-by-name name)))



More information about the usocket-cvs mailing list