Changeset f1a273685f36f1fb7fac47ea3a1faae22b58a352

Show
Ignore:
Timestamp:
10/27/09 00:41:17 (4 weeks ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
git-author:
Alejandro R. Sedeño <asedeno@mit.edu> / 2009-10-24T20:58:04Z-0400
Parents:
6fc40a789c812bcdaacbe64f88178bb1409d1071
Children:
a01ed7cdca6315ea934496b953495210530f61f7
git-committer:
Alejandro R. Sedeño <asedeno@mit.edu> / 2009-10-27T00:41:17Z-0400
Message:
Switch perl modules to the new I/O Dispatch API.

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Location:
perl/modules
Files:
4 modified

Legend:

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

    rda554da rf1a2736  
    381381        $ircnets{$alias} = $conn; 
    382382        my $fd = $conn->getSocket()->fileno(); 
    383         BarnOwl::add_dispatch($fd, \&OwlProcess); 
     383        BarnOwl::add_io_dispatch($fd, 'r', \&OwlProcess); 
    384384        $conn->{FD} = $fd; 
    385385    } else { 
  • perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm

    r7cfb1df rf1a2736  
    210210        } 
    211211    } 
    212     BarnOwl::remove_dispatch($self->{FD}); 
     212    BarnOwl::remove_io_dispatch($self->{FD}); 
    213213    BarnOwl::admin_message('IRC', 
    214214                           "[" . $self->alias . "] Disconnected from server"); 
  • perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm

    rf3678c3 rf1a2736  
    471471                $conn->renameConnection($jidStr, $fullJid); 
    472472                queue_admin_msg("Connected to jabber as $fullJid"); 
    473                 # The remove_dispatch() method is called from the 
     473                # The remove_io_dispatch() method is called from the 
    474474                # ConnectionManager's removeConnection() method. 
    475475                $client->{fileno} = $client->getSocket()->fileno(); 
    476476                #queue_admin_msg("Connected to jabber as $fullJid ($client->{fileno})"); 
    477                 BarnOwl::add_dispatch($client->{fileno}, sub { $client->OwlProcess($fullJid) }); 
     477                BarnOwl::add_io_dispatch($client->{fileno}, 'r', sub { $client->OwlProcess($fullJid) }); 
    478478 
    479479                # populate completion from roster. 
  • perl/modules/Jabber/lib/BarnOwl/Module/Jabber/ConnectionManager.pm

    r8590774 rf1a2736  
    3737    return 0 unless exists $self->{$jidStr}; 
    3838 
    39     BarnOwl::remove_dispatch($self->{$jidStr}->{Client}->{fileno}) if $self->{$jidStr}->{Client}->{fileno}; 
     39    BarnOwl::remove_io_dispatch($self->{$jidStr}->{Client}->{fileno}) if $self->{$jidStr}->{Client}->{fileno}; 
    4040    $self->{$jidStr}->{Client}->Disconnect() 
    4141      if $self->{$jidStr}->{Client}; 
     
    5555    } 
    5656 
    57     BarnOwl::remove_dispatch($self->{$jidStr}->{Client}->{fileno}) if $self->{$jidStr}->{Client}->{fileno}; 
     57    BarnOwl::remove_io_dispatch($self->{$jidStr}->{Client}->{fileno}) if $self->{$jidStr}->{Client}->{fileno}; 
    5858    $self->{$jidStr}->{Client}->Disconnect() 
    5959      if $self->{$jidStr}->{Client};