Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the XML-Stream CPAN distribution.

Report information
The Basics
Id:
21932
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
dapatrick [...] cpan.org
Requestors:
hirose31 [...] t3.rim.or.jp
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
1.22
Fixed in:
  • 1.23
  • 1.23_01



Subject: XML::Stream patch for support Google Talk w/ Net::XMPP
Date: Fri, 06 Oct 2006 15:32:49 +0900
To: bug-XML-Stream@rt.cpan.org
From: "HIROSE, Masaaki" <hirose31@t3.rim.or.jp>
Hello, Following patch is for connect Google Talk with Net::XMPP. on Google Talk, server name (talk.google.com) and domain part of jid (gmail.com) are different. But 'authname' must be not "talk.google.com" but "gmail.com". XML::Stream can get "gmail.com" via $self->{SIDS}->{$sid}->{to} which is setted by "componentname" in Net::XMPP::Connection#Connect. so this patch to use {$sid}->{to} if exists. and we can connect Google Talk just like following code fragment. my $xmpp = Net::XMPP::Client->new(); $xmpp->Connect( hostname => 'talk.google.com', tls => 1, componentname => 'gmail.com', ); Cheers, -- HIROSE, Masaaki -----------8<-----------8<-----------8<-----------8<-----------8<----------- --- Stream.pm.orig 2004-08-25 23:23:32.000000000 +0900 +++ Stream.pm 2006-08-17 19:00:07.000000000 +0900 @@ -2113,7 +2113,7 @@ my $sasl = new Authen::SASL(mechanism=>join(" ",@{$mechanisms}), callback=>{ - authname => $username."@".$self->{SIDS}->{$sid}->{hostname}, + authname => $username."@".($self->{SIDS}->{$sid}->{to} or $self->{SIDS}->{$sid}->{hostname}), user => $username, pass => $password -----------8<-----------8<-----------8<-----------8<-----------8<-----------
Hi Hirose,

Thanks for the patch.  I've integrated it and you can test by cloning from my git repo.  It's available at http://github.com/dap/XML-Stream

Darian

On Fri Oct 06 02:33:05 2006, hirose31@t3.rim.or.jp wrote:
Show quoted text
> Hello,
>
> Following patch is for connect Google Talk with Net::XMPP.
>
> on Google Talk, server name (talk.google.com) and domain part of jid
> (gmail.com) are different. But 'authname' must be not
> "talk.google.com" but "gmail.com".
>
> XML::Stream can get "gmail.com" via $self->{SIDS}->{$sid}->{to} which
> is setted by "componentname" in Net::XMPP::Connection#Connect.
>
> so this patch to use {$sid}->{to} if exists.
>
> and we can connect Google Talk just like following code fragment.
>
> my $xmpp = Net::XMPP::Client->new();
> $xmpp->Connect(
> hostname => 'talk.google.com',
> tls => 1,
> componentname => 'gmail.com',
> );
>
> Cheers,
>



This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.