Update of /cvsroot/emacs-jabber/emacs-jabber
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv11676
Modified Files:
srv.el
Log Message:
Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-351
Creator: Magnus Henoch <ma...@fr...>
Don't require dns.el to be available
Index: srv.el
===================================================================
RCS file: /cvsroot/emacs-jabber/emacs-jabber/srv.el,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -d -r2.1 -r2.2
--- srv.el 23 Apr 2006 15:09:56 -0000 2.1
+++ srv.el 1 May 2007 16:37:16 -0000 2.2
@@ -1,6 +1,6 @@
;;; srv.el --- perform SRV DNS requests
-;; Copyright (C) 2005 Magnus Henoch
+;; Copyright (C) 2005, 2007 Magnus Henoch
;; Author: Magnus Henoch <ma...@fr...>
;; Keywords: comm
@@ -29,7 +29,9 @@
;;; Code:
-(require 'dns)
+(condition-case nil
+ (require 'dns)
+ (error nil))
(eval-when-compile (require 'cl))
(defun srv-lookup (target)
@@ -40,6 +42,8 @@
a hostname and PORT is a numeric port. The caller is supposed to
make connection attempts in the order given, starting from the beginning
of the list. The list is empty if no SRV records were found."
+ (unless (boundp 'dns-query-types)
+ (error "No dns.el available"))
(unless (assq 'SRV dns-query-types)
(error "dns.el doesn't support SRV lookups"))
(let* ((result (query-dns target 'SRV t))
|