2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-02 00:48:53 +00:00

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
This commit is contained in:
bios01 2015-01-10 19:35:51 +00:00
parent 6c30b81d03
commit db903eb163
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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. # 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" - bugfix: 70_PIONEERAVR: fixed "missed to call readingsBeginUpdate first"
- feature: fhemweb.js rewrite based on jQuery, single-widget-implementation - feature: fhemweb.js rewrite based on jQuery, single-widget-implementation
- feature: SVG: multiple sources allowed, Plot-Editor - feature: SVG: multiple sources allowed, Plot-Editor

View File

@ -25,6 +25,7 @@
# Version: 1.1 - 2014-07-28 # Version: 1.1 - 2014-07-28
# #
# Changelog: # 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.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.1 2014-07-28 Added UTF8 encoding / decoding to Messages
# v1.0 2014-04-10 Stable Release - Housekeeping & Add to SVN # v1.0 2014-04-10 Stable Release - Housekeeping & Add to SVN
@ -50,7 +51,6 @@ use utf8;
use Time::HiRes qw(gettimeofday); use Time::HiRes qw(gettimeofday);
use Net::Jabber; use Net::Jabber;
sub Jabber_Set($@); sub Jabber_Set($@);
sub Jabber_Define($$); sub Jabber_Define($$);
sub Jabber_UnDef($$); sub Jabber_UnDef($$);
@ -348,6 +348,9 @@ sub Jabber_CheckConnection($)
$hash->{JabberDevice}->{STREAM}->{SIDS}->{default}->{ssl_verify} = 0x00; $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: #Needed for Message handling:
$hash->{JabberDevice}->SetMessageCallBacks(normal => sub { \&Jabber_INC_Message($hash,@_) }, chat => sub { \&Jabber_INC_Message($hash,@_) } ); $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 #Needed if someone wants to subscribe to us and is on the WhiteList
@ -364,11 +367,13 @@ sub Jabber_CheckConnection($)
} }
if (!$hash->{JabberDevice}->Connected()) { if (!$hash->{JabberDevice}->Connected()) {
my $connectionstatus = $hash->{JabberDevice}->Connect( my $connectionstatus = $hash->{JabberDevice}->Connect(
hostname=>$hash->{helper}{server}, hostname=>$hash->{helper}{server},
port=>$hash->{helper}{port}, port=>$hash->{helper}{port},
tls=>$hash->{helper}{tls}, tls=>$hash->{helper}{tls},
ssl=>$hash->{helper}{ssl} ssl=>$hash->{helper}{ssl},
componentname=>$hash->{helper}{server}
); );
if (!defined($connectionstatus)) { if (!defined($connectionstatus)) {