Changeset 2d423e9


Ignore:
Timestamp:
Jan 22, 2007, 7:00:17 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:
eaf9ed0
Parents:
6837096
git-author:
Nelson Elhage <nelhage@mit.edu> (01/22/07 19:00:11)
git-committer:
Nelson Elhage <nelhage@mit.edu> (01/22/07 19:00:17)
Message:
Don't die horribly if a connection becomed undefined (often due to a
failed reload)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/jabber.pl

    r6837096 r2d423e9  
    248248        my $client = $conn->getConnectionFromJidStr($jid);
    249249
     250        unless($client) {
     251            $conn->removeConnection($jid);
     252            BarnOwl::error("Connection for $jid undefined -- error in reload?");
     253        }
     254       
    250255        my $status = $client->Process(0);
    251256        if ( !defined($status) ) {
     
    273278    my $res = $roster->resource($buddy);
    274279
    275     $blistStr .= $jq{name} ? $jq{name} . "\t(" .$buddy->GetJID() . ')' : $buddy->GetJID();
     280    my $name = $jq{name} || $buddy->GetUserID();
     281
     282    $blistStr .= sprintf '%-15s %s', $name, $buddy->GetJID();
    276283
    277284    if ($res) {
     
    306313        foreach my $group ( $roster->groups() ) {
    307314            $blist .= "  Group: $group\n";
    308             foreach my $buddy ( $roster->jids( 'group', $group ) ) {
     315            my @buddies = $roster->jids( 'group', $group );
     316            foreach my $buddy ( @buddies ) {
    309317                $blist .= blist_listBuddy( $roster, $buddy );
    310318            }
     
    742750        deauth   => \&jroster_deauth
    743751    );
    744 
    745752    my $func = $jroster_commands{$cmd};
    746753    if ( !$func ) {
Note: See TracChangeset for help on using the changeset viewer.