Ignore:
Timestamp:
Apr 12, 2007, 6:05:37 PM (17 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
80e54a7
Parents:
c2c5c77
Message:
Net::XMPP::Protocol -  Make resource binding note the full jid on connect.
BarnOwl::Module::Jabber::ConnectionManager - Allow for connections to be renamed.
BarnOwl::Module::Jabber - Rename the connection after connect to match the jid received.

This makes Net::XMPP recognize that the server may in fact connect a
user under a different resource than the one the user specified. In
particular, it works around the crap GoogleTalk appends to the
supplied resource.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Jabber/lib/BarnOwl/Module/Jabber/ConnectionManager.pm

    r2cedb7a r7f33c18  
    4141    delete $self->{$jidStr};
    4242
     43    return 1;
     44}
     45
     46sub renameConnection {
     47    my $self = shift;
     48    my $oldJidStr = shift;
     49    my $newJidStr = shift;
     50    return 0 unless exists $self->{$oldJidStr};
     51    return 0 if $oldJidStr eq $newJidStr;
     52
     53    $self->{$newJidStr} = $self->{$oldJidStr};
     54    delete $self->{$oldJidStr};
    4355    return 1;
    4456}
Note: See TracChangeset for help on using the changeset viewer.