From db903eb163259ed369ae60b78bb41d76efe6c518 Mon Sep 17 00:00:00 2001 From: bios01 <> Date: Sat, 10 Jan 2015 19:35:51 +0000 Subject: [PATCH] 70_Jabber.pm: Fixed DNS SRV resolving and resulting wrong to: address git-svn-id: https://svn.fhem.de/fhem/trunk@7502 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/70_Jabber.pm | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 0e6d8e2ea..ddc3d9887 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 70_Jabber.pm: XMPP DNS SVR record query added - bugfix: 70_PIONEERAVR: fixed "missed to call readingsBeginUpdate first" - feature: fhemweb.js rewrite based on jQuery, single-widget-implementation - feature: SVG: multiple sources allowed, Plot-Editor diff --git a/fhem/FHEM/70_Jabber.pm b/fhem/FHEM/70_Jabber.pm index 574dd669c..a1bd11488 100644 --- a/fhem/FHEM/70_Jabber.pm +++ b/fhem/FHEM/70_Jabber.pm @@ -25,6 +25,7 @@ # Version: 1.1 - 2014-07-28 # # Changelog: +# v1.3 2015-01-10 Fixed DNS SRV resolving and resulting wrong to: address # v1.2 2015-01-09 hardening XML::Stream Process() call and fix of ssl_verify # v1.1 2014-07-28 Added UTF8 encoding / decoding to Messages # v1.0 2014-04-10 Stable Release - Housekeeping & Add to SVN @@ -50,7 +51,6 @@ use utf8; use Time::HiRes qw(gettimeofday); use Net::Jabber; - sub Jabber_Set($@); sub Jabber_Define($$); sub Jabber_UnDef($$); @@ -348,6 +348,9 @@ sub Jabber_CheckConnection($) $hash->{JabberDevice}->{STREAM}->{SIDS}->{default}->{ssl_verify} = 0x00; } + #Default to to SRV lookups, ugly hack because older versions of XMPP::Connection dont call the respective value in XML::Stream.. + $hash->{JabberDevice}->{STREAM}->{SIDS}->{default}->{srv} = "_xmpp-client._tcp"; + #Needed for Message handling: $hash->{JabberDevice}->SetMessageCallBacks(normal => sub { \&Jabber_INC_Message($hash,@_) }, chat => sub { \&Jabber_INC_Message($hash,@_) } ); #Needed if someone wants to subscribe to us and is on the WhiteList @@ -364,11 +367,13 @@ sub Jabber_CheckConnection($) } if (!$hash->{JabberDevice}->Connected()) { + my $connectionstatus = $hash->{JabberDevice}->Connect( hostname=>$hash->{helper}{server}, port=>$hash->{helper}{port}, tls=>$hash->{helper}{tls}, - ssl=>$hash->{helper}{ssl} + ssl=>$hash->{helper}{ssl}, + componentname=>$hash->{helper}{server} ); if (!defined($connectionstatus)) {