Репозитории ALT
Группа :: Разработка/Perl
Пакет: perl-Net-XMPP
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: perl-Net-XMPP-alt-fixes.patch
Скачать
Скачать
diff -Naur Net-XMPP-1.0.orig/lib/Net/XMPP/Stanza.pm Net-XMPP-1.0/lib/Net/XMPP/Stanza.pm
--- Net-XMPP-1.0.orig/lib/Net/XMPP/Stanza.pm 2004-08-17 08:09:22 +0400
+++ Net-XMPP-1.0/lib/Net/XMPP/Stanza.pm 2004-10-03 23:46:40 +0400
@@ -212,6 +212,7 @@
use strict;
use Carp;
+use Net::XMPP::Debug;
use Net::XMPP::Namespaces;
use vars qw( $AUTOLOAD %FUNCTIONS $DEBUG );
diff -Naur Net-XMPP-1.0.orig/t/3_client_jabberd2.t Net-XMPP-1.0/t/3_client_jabberd2.t
--- Net-XMPP-1.0.orig/t/3_client_jabberd2.t 2004-07-30 04:08:33 +0400
+++ Net-XMPP-1.0/t/3_client_jabberd2.t 1970-01-01 03:00:00 +0300
@@ -1,103 +0,0 @@
-use lib "t/lib";
-use Test::More tests=>5;
-
-BEGIN{ use_ok( "Net::XMPP" ); }
-
-my $Client;
-my $connected = 0;
-
-my $server = "obelisk.net";
-my $port = 5225;
-my $username = "test-netjabber";
-my $password = "test";
-my $resource = $$.time.qx(hostname);
-chomp($resource);
-
-###############################################################################
-#
-# Make sure you can ever connect to the server. If we cannot then we should
-# skip the rest of the tests because they will fail.
-#
-###############################################################################
-SKIP:
-{
- my $sock = IO::Socket::INET->new(PeerAddr=>"$server:$port");
- skip "Cannot open connection (maybe a firewall?)",4 unless defined($sock);
- $sock->close();
-
- $Client = new Net::XMPP::Client();
-
- $Client->SetCallBacks(onconnect => \&onConnect,
- onauth => \&onAuth,
- message => \&onMessage,
- );
-
- $Client->Execute(username=>$username,
- password=>$password,
- resource=>$resource,
- hostname=>$server,
- port=>$port,
- register=>1,
- connectsleep=>0,
- connectattempts=>1,
- );
-
- #--------------------------------------------------------------------------
- # If all went well, we should never get here.
- #--------------------------------------------------------------------------
- ok(0,"Connected") unless $connected;
- ok(0,"Authenticated");
- ok(0,"Subject");
- ok(0,"Body");
-}
-
-
-###############################################################################
-#
-# onConnect - when we establish an initial connection to the server run the
-# following
-#
-###############################################################################
-sub onConnect
-{
- $connected = 1;
- ok(1, "Connected");
-}
-
-
-###############################################################################
-#
-# onAuth - when we have successfully authenticated with the server send a
-# test message to ourselves.
-#
-###############################################################################
-sub onAuth
-{
- $Client->MessageSend(to=>$username."@".$server."/".$resource,
- subject=>"test",
- body=>"This is a test.");
-
- ok(1, "Authenticated");
-}
-
-
-###############################################################################
-#
-# onMessage - when we get a message, check that the contents match what we sent
-# above.
-#
-###############################################################################
-sub onMessage
-{
- my $sid = shift;
- my $message = shift;
-
- is( $message->GetSubject(), "test", "Subject" );
- is( $message->GetBody(), "This is a test.", "Body" );
-
- $Client->Disconnect();
-
- exit(0);
-}
-
-