[usocket-cvs] r258 - usocket/trunk

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Tue Jun 5 15:07:17 UTC 2007


Author: ehuelsmann
Date: Tue Jun  5 11:07:16 2007
New Revision: 258

Modified:
   usocket/trunk/usocket.lisp
Log:
Fix crash where resolution leads to 'no data'. Return NIL instead.

Modified: usocket/trunk/usocket.lisp
==============================================================================
--- usocket/trunk/usocket.lisp	(original)
+++ usocket/trunk/usocket.lisp	Tue Jun  5 11:07:16 2007
@@ -296,7 +296,8 @@
 
   (defun get-random-host-by-name (name)
     (let ((hosts (get-hosts-by-name name)))
-      (elt hosts (random (length hosts)))))
+      (when hosts
+        (elt hosts (random (length hosts))))))
 
   (defun host-to-vector-quad (host)
     "Translate a host specification (vector quad, dotted quad or domain name)



More information about the usocket-cvs mailing list