1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
From 92af6b9bf4a583f6cec00a38d2fd3948654a64bc Mon Sep 17 00:00:00 2001
From: Lubomir Host <lubomir.host@gmail.com>
Date: Fri, 23 Jan 2015 00:22:02 +0100
Subject: [PATCH] Enable SRV record lookup by default
---
sendxmpp | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/sendxmpp b/sendxmpp
index 74d95c0..0d7c4ff 100755
--- a/sendxmpp
+++ b/sendxmpp
@@ -344,26 +344,27 @@ sub xmpp_login ($$$$$$$$$$$$) { # {{{
ssl_ca_path => $tls_ca_path,
ssl => $ssl,
connectiontype => 'tcpip',
- componentname => $comp
+ componentname => $comp,
+ srv => 1, # enable SRV lookups
};
if ($sso) {
- $user = join('@', scalar getpwuid($<), Net::Domain::hostdomain());
- debug_print "using SSO user $user";
+ $user = join('@', scalar getpwuid($<), Net::Domain::hostdomain());
+ debug_print "using SSO user $user";
}
# use the xmpp domain as the host and enable SRV lookups
- if (!$host) {
- if ($user =~ /@(.*)/) {
- $arghash->{hostname} = $host = $1;
- $arghash->{srv} = 1;
- debug_print "enabling SRV lookups";
-
- } else {
- error_exit "unable to determine a host to connect to (no cmdline, no config, no SRV possible)";
- }
+ if (!$host) {
+ if ($user =~ /@(.*)/) {
+ $arghash->{hostname} = $host = $1;
+ $arghash->{srv} = 1;
+ debug_print "enabling SRV lookups";
- }
+ } else {
+ error_exit "unable to determine a host to connect to (no cmdline, no config, no SRV possible)";
+ }
+
+ }
delete $arghash->{port} unless $port;
if ($arghash->{port}) {
|