Changeset 5f3168a for perl/modules/Jabber
- Timestamp:
- Feb 18, 2008, 9:07:22 PM (16 years ago)
- 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:
- b70d24f
- Parents:
- 680ed23 (diff), 9d2f010 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- perl/modules/Jabber/lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
ree310eb r5f3168a 118 118 BarnOwl::error("Connection for $jid undefined -- error in reload?"); 119 119 } 120 120 # We keep this in the mainloop hook for keep-alives 121 121 my $status = $client->Process(0); 122 122 if ( !defined($status) ) { … … 126 126 if ($::shutdown) { 127 127 do_logout($jid); 128 return; 129 } 128 next; 129 } 130 130 131 if ($vars{status_changed}) { 131 132 my $p = new Net::Jabber::Presence; … … 389 390 $conn->renameConnection($jidStr, $fullJid); 390 391 queue_admin_msg("Connected to jabber as $fullJid"); 392 # The remove_dispatch() method is called from the 393 # ConnectionManager's removeConnection() method. 394 $client->{fileno} = $client->getSocket()->fileno(); 395 #queue_admin_msg("Connected to jabber as $fullJid ($client->{fileno})"); 396 BarnOwl::add_dispatch($client->{fileno}, sub { $client->OwlProcess() }); 391 397 } 392 398 } -
perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Connection.pm
re0ffe77 r5f3168a 111 111 112 112 113 =head2 getSID 114 115 Returns the StreamID for this connection. 116 117 =cut 118 119 sub getStreamID { 120 my $self = shift; 121 return $self->{SESSION}->{id} || ""; 122 } 123 124 =head2 getSocket 125 126 Returns the IO::Socket for this connection. 127 128 =cut 129 130 sub getSocket { 131 my $self = shift; 132 my $sid = getStreamID($self); 133 return $self->{STREAM}->GetSock($sid) || -1; 134 } 135 136 =head2 OwlProcess 137 138 Non-blocking connection processing. For use in a select loop. 139 140 =cut 141 142 sub OwlProcess { 143 my $self = shift; 144 my $status = $self->Process(0); 145 if ( !defined($status) ) { 146 my $jid = $self->{SESSION}->{FULLJID}; 147 BarnOwl::error("Jabber account $jid disconnected!"); 148 BarnOwl::Module::Jabber::do_logout($jid); 149 } 150 } 151 113 152 =head1 SEE ALSO 114 153 -
perl/modules/Jabber/lib/BarnOwl/Module/Jabber/ConnectionManager.pm
r7f33c18 r6b580b0 37 37 return 0 unless exists $self->{$jidStr}; 38 38 39 BarnOwl::remove_dispatch($self->{$jidStr}->{Client}->{fileno}) if $self->{$jidStr}->{Client}->{fileno}; 39 40 $self->{$jidStr}->{Client}->Disconnect() 40 41 if $self->{$jidStr}->{Client}; … … 51 52 return 0 if $oldJidStr eq $newJidStr; 52 53 53 $self->{$newJidStr} = $self->{$oldJidStr}; 54 $self->{$newJidStr} = $self->{$oldJidStr}; 54 55 delete $self->{$oldJidStr}; 55 56 return 1; -
perl/modules/Jabber/lib/Net/XMPP/Debug.pm
rc2bed55 rb7b2a76 189 189 { 190 190 $self->{HANDLE}->autoflush(1); 191 binmode $self->{HANDLE}, ":utf8"; 191 192 $Net::XMPP::Debug::HANDLES{$args{file}} = $self->{HANDLE}; 192 193 } -
perl/modules/Jabber/lib/Net/XMPP/Message.pm
rc2bed55 r8574801 135 135 $Mess->SetMessage(TO=>"bob\@jabber.org", 136 136 Subject=>"Lunch", 137 Bo Dy=>"Let's do lunch!");137 Body=>"Let's do lunch!"); 138 138 $Mess->SetMessage(to=>"bob\@jabber.org", 139 139 from=>"jabber.org", -
perl/modules/Jabber/lib/XML/Stream.pm
r5073972 ra8d5a39 1659 1659 { 1660 1660 $self->debug(3,"Send: can_write"); 1661 1661 1662 1662 $self->{SENDSTRING} = Encode::encode_utf8(join("",@_)); 1663 1663
Note: See TracChangeset
for help on using the changeset viewer.