aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2009-08-03 15:03:50 +0000
committerBadlop <badlop@process-one.net>2009-08-03 15:03:50 +0000
commit720fd7605d768458047ad6768b7cb1631858d370 (patch)
tree4face13403ae0e285d48d259520901e23f5f6edd
parentfix is_last_item_cache_enabled issue with PEP, and fix indentation (diff)
Document the new option s2s_dns_options, expressed in seconds (EJAB-994)
SVN Revision: 2417
-rw-r--r--doc/guide.html4
-rw-r--r--doc/guide.tex4
-rw-r--r--src/ejabberd_s2s_out.erl4
3 files changed, 10 insertions, 2 deletions
diff --git a/doc/guide.html b/doc/guide.html
index b72ca38f7..4bfe5e61c 100644
--- a/doc/guide.html
+++ b/doc/guide.html
@@ -792,6 +792,10 @@ Full path to the file containing the SSL certificate for a specific domain.
Specify which address families to try, in what order, and connect timeout in milliseconds.
By default it first tries connecting with IPv4, if that fails it tries using IPv6,
with a timeout of 10000 milliseconds.
+</DD><DT CLASS="dt-description"><B><TT>{s2s_dns_options, [{Property, Value}]}</TT></B></DT><DD CLASS="dd-description">
+Define properties to use for DNS resolving.
+Allowed Properties are: <TT>timeout</TT> in seconds which default value is <TT>10</TT>
+and <TT>retries</TT> which default value is <TT>2</TT>.
</DD><DT CLASS="dt-description"><B><TT>{s2s_default_policy, allow|deny}</TT></B></DT><DD CLASS="dd-description">
The default policy for incoming and outgoing s2s connections to other Jabber servers.
The default value is <TT>allow</TT>.
diff --git a/doc/guide.tex b/doc/guide.tex
index 957a85286..4141d23ea 100644
--- a/doc/guide.tex
+++ b/doc/guide.tex
@@ -931,6 +931,10 @@ There are some additional global options that can be specified in the ejabberd c
Specify which address families to try, in what order, and connect timeout in milliseconds.
By default it first tries connecting with IPv4, if that fails it tries using IPv6,
with a timeout of 10000 milliseconds.
+ \titem{\{s2s\_dns\_options, [\{Property, Value\}]\}}
+ \ind{options!s2s\_dns\_options}Define properties to use for DNS resolving.
+ Allowed Properties are: \term{timeout} in seconds which default value is \term{10}
+ and \term{retries} which default value is \term{2}.
\titem{\{s2s\_default\_policy, allow|deny\}}
The default policy for incoming and outgoing s2s connections to other Jabber servers.
The default value is \term{allow}.
diff --git a/src/ejabberd_s2s_out.erl b/src/ejabberd_s2s_out.erl
index 4bd92dc09..0366ec30e 100644
--- a/src/ejabberd_s2s_out.erl
+++ b/src/ejabberd_s2s_out.erl
@@ -1037,9 +1037,9 @@ srv_lookup(Server) ->
L when is_list(L) -> L;
_ -> []
end,
- Timeout = proplists:get_value(timeout, Options, timer:seconds(10)),
+ TimeoutMs = timer:seconds(proplists:get_value(timeout, Options, 10)),
Retries = proplists:get_value(retries, Options, 2),
- srv_lookup(Server, Timeout, Retries).
+ srv_lookup(Server, TimeoutMs, Retries).
%% XXX - this behaviour is suboptimal in the case that the domain
%% has a "_xmpp-server._tcp." but not a "_jabber._tcp." record and