Changeset b1f2fb0 for perl


Ignore:
Timestamp:
Jan 8, 2007, 9:40:27 PM (18 years ago)
Author:
Nelson Elhage <nelhage@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:
d89b57f
Parents:
9364a36
git-author:
Nelson Elhage <nelhage@mit.edu> (01/08/07 21:39:53)
git-committer:
Nelson Elhage <nelhage@mit.edu> (01/08/07 21:40:27)
Message:
Fixing Net::Jabber bugs. $jid->isa() doesn't do what you want if $jid
is a bare string.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/Net/XMPP/Roster.pm

    ra75309a rb1f2fb0  
    269269    my ($jid,%item) = @_;
    270270
    271     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     271    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    272272
    273273    $self->{JIDS}->{$jid} = \%item;
     
    293293    my (%item) = @_;
    294294
    295     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     295    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    296296
    297297    my $priority = $item{priority};
     
    347347    my ($jid) = @_;
    348348
    349     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     349    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    350350   
    351351    return unless exists($self->{JIDS});
     
    555555    my $jid = shift;
    556556
    557     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     557    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    558558
    559559    return unless $self->exists($jid);
     
    577577    my $resource = shift;
    578578
    579     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     579    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    580580   
    581581    if (defined($resource))
     
    603603    my $key = shift;
    604604
    605     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     605    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    606606   
    607607    return unless $self->exists($jid);
     
    625625    my $jid = shift;
    626626
    627     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     627    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    628628
    629629    if ($self->exists($jid))
     
    660660    my $resource = shift;
    661661
    662     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     662    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    663663
    664664    if ($self->resourceExists($jid,$resource))
     
    701701    my $jid = shift;
    702702
    703     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     703    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    704704
    705705    return unless $self->exists($jid);
     
    724724    my $resource = shift;
    725725   
    726     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     726    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    727727
    728728    return unless $self->exists($jid);
     
    745745    my $key = shift;
    746746
    747     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     747    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    748748   
    749749    return unless $self->resourceExists($jid,$resource);
     
    767767    my $jid = shift;
    768768
    769     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     769    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    770770
    771771    return () unless $self->exists($jid);
     
    800800    my $value = shift;
    801801
    802     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     802    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    803803
    804804    return unless defined($key);
     
    824824    my $value = shift;
    825825
    826     $jid = $jid->GetJID() if $jid->isa("Net::XMPP::JID");
     826    $jid = $jid->GetJID() if ref($jid) && $jid->isa("Net::XMPP::JID");
    827827
    828828    return unless defined($key);
Note: See TracChangeset for help on using the changeset viewer.