Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-XMPP CPAN distribution.

Report information
The Basics
Id: 42250
Status: open
Priority: 4/
Queue: Net-XMPP

People
Owner: Nobody in particular
Requestors: dusty [...] hey.nu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.02
Fixed in: (no value)



Subject: not-authorized in win32, works fine in linux
Using the exact same code, it works well in Linux but not in Windows (XP Pro, ActivePerl 5.10). Using strace, I've gathered the list of perl modules required and tested to be sure they were available in Windows (they are). Anyone get this to work in Windows? It doesn't seem to matter if I choose TLS or not. Attached is the code I'm using in my test. User auth info is set to nonsense values, of course.
Subject: test2.pl
use strict; use Authen::SASL qw(Perl); use Net::XMPP qw(Client); use Megagram::ResolveSRV; my $VERSION = '0.01'; my $xmpp = Net::XMPP::Client->new(); $xmpp->SetCallBacks(message => \&xmppHandler, presence => \&xmppHandler, iq => \&xmppHandler); my $domain = 'example.com'; my $username = 'bobthebuilder'; my $password = 'yeswecan'; sub xmppConnect { my $rsrv = Megagram::ResolveSRV->new; my @hosts = $rsrv->resolve('_xmpp-server._tcp.'.$domain); unless ($hosts[0]) { print qq($domain doesn't appear to offer XMPP service.\n); return undef; } my $status; foreach my $host (@hosts) { my $target = $host->{target}; my $port = $host->{port}; printf("Attempting to connect to %s:%s\n", $target, $port); $status = $xmpp->Connect(hostname => $target, port => $port, componentname => $domain, tls => 1); last if defined($status); } unless (defined($status)) { print qq(ERROR: XMPP service unavailable: $!\n); return undef; } $xmpp->{STREAM}->{SIDS}->{$xmpp->{SESSION}->{id}}->{hostname} = $domain; my @result = $xmpp->AuthSend(username => $username, password => $password, resource => 'TestClient_'.$VERSION); unless ($result[0] eq 'ok') { print qq(ERROR: Auth failed: $result[0] - $result[1]\n); return undef; } $xmpp->RosterGet(); $xmpp->PresenceSend(status => "Testing."); $xmpp->{presence}->{"$username\@$domain"} = "Testing."; return 1; } sub xmppHandler { my ($sid, $event) = @_; my $type = $event->GetType() || $event->{TREE}->{TAG} || 'unknown'; print qq(XMPP-EVENT: $type\n); use Data::Dumper; print Dumper($event); #runModule(command => '_xmpp_'.$type, sid => $sid, event => $event); } while (1) # process loop { if ($xmpp->Connected()) { xmppConnect() if ($xmpp->Process(1) eq undef); } else { xmppConnect() or die(qq(Can't connect to XMPP.\n)); } sleep(1); }
I'm seeing the same problem that is reported here on my windows perl installation (ActiveState 5.8.x). After some investigation and turning on debug for Net::XMPP, It sure looks like it's complaining about not having Authen::SASL::Cyrus. I tried getting this from various ppm repositories and it looks like it just doesn't build for windows at all. I even tried building it manually and had no luck because this module is assuming unix TCP headers that don't exist on windows. In any event, it seems like Authen::SASL::Cyrus ought to be made a prerequisite for this package if it is truly required. This XMPP seems to very complete but quite untested on Windows.
On Fri Jan 23 15:43:41 2009, mellery wrote: Show quoted text
> I'm seeing the same problem that is reported here on my windows perl > installation (ActiveState 5.8.x). After some investigation and turning > on debug for Net::XMPP, It sure looks like it's complaining about not > having Authen::SASL::Cyrus. I tried getting this from various ppm > repositories and it looks like it just doesn't build for windows at all. > I even tried building it manually and had no luck because this module is > assuming unix TCP headers that don't exist on windows.
As I described at [ http://www.perlmonks.org/?node_id=735105 ], if you use "AuthIQAuth" instead of "AuthSend", it works. It's a workaround. Show quoted text
> In any event, it seems like Authen::SASL::Cyrus ought to be made a > prerequisite for this package if it is truly required. This XMPP seems > to very complete but quite untested on Windows.
Hello, Are you still affected by this problem? I'm trying to replicate it and not having any luck. Could you fill me in on which particular SASL mechs you XMPP servers is indicating support for? Thanks, Darian