2002-03-31 Andrew Cohen <cohen@andy.bu.edu>
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 31 Mar 2002 16:36:22 +0000 (16:36 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 31 Mar 2002 16:36:22 +0000 (16:36 +0000)
* dns.el: open-network-stream under XEmacs does udp.

lisp/ChangeLog
lisp/dns.el

index 902d9b3..77ae0c7 100644 (file)
@@ -1,3 +1,7 @@
+2002-03-31  Andrew Cohen  <cohen@andy.bu.edu>
+
+       * dns.el: open-network-stream under XEmacs does udp.
+
 2002-03-31  Lars Magne Ingebrigtsen  <larsi@quimbies.gnus.org>
 
        * spam.el (spam-enter-whitelist): New function.
index a2010f9..c35300e 100644 (file)
@@ -291,19 +291,24 @@ If FULLP, return the entire record returned."
   (mm-with-unibyte-buffer
     (let ((coding-system-for-read 'binary) 
          (coding-system-for-write 'binary)
-         (tcp-p (not (fboundp 'open-network-stream))))
+         (tcp-p (and (not (fboundp 'open-network-stream))
+                     (not (featurep 'xemacs)))))
       (let ((process
-            (if tcp-p
-                (open-network-stream
-                 "dns" (current-buffer)
-                 (car dns-servers) "domain")
+            (cond
+             ((featurep 'xemacs)
+              (open-network-stream
+               "dns" (current-buffer) (car dns-servers) "domain" 'udp))
+             (tcp-p
+              (open-network-stream
+               "dns" (current-buffer) (car dns-servers) "domain"))
+             (t
               (make-network-process
                :name "dns"
                :coding 'binary
                :buffer (current-buffer)
                :host (car dns-servers)
                :service "domain"
-               :type 'datagram)))
+               :type 'datagram))))
            (step 100)
            (times (* dns-timeout 1000))
            (id (random 65000)))