[1794] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

Re: jabber-reconnect and irc-list-in-buddylist branches

daemon@ATHENA.MIT.EDU (Alex Vandiver)
Thu Oct 29 18:22:13 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@lunatique.mit.edu
Cc: barnowl-dev <barnowl-dev@mit.edu>
From: Alex Vandiver <alex@chmrr.net>
To: Nelson Elhage <nelhage@mit.edu>
In-reply-to: <20091017204104.GA21998@mit.edu>
Date: Sun, 18 Oct 2009 03:00:23 -0400

At Sat Oct 17 16:41:04 -0400 2009, Nelson Elhage wrote:
> [irc-list-in-buddylist]
> 
> Looks fine. My one comment is that
> 
> +        my ($nick, $server) = map $ircnets{$net}->$_, qw/nick server/;
> 
> Seems unnecessarily tricky. It took my a couple seconds to parse, and
> I speak perl pretty fluently. I would be inclined to stick
> $ircnet{$net} in a variable and just have something like
> 
>  my ($nick, $server) = ($conn->nick, $conn->server);

Updated and pushed.

> [jabber-reconnect]
> 
> What happens if I log in to Jabber with tickets, and then get
> disconnected after my tickets expire? I assume it should fail and keep
> trying every 5 minutes, but I want to be sure it doesn't prompt for
> your password or anything annoying like that.

Actually, it fails the first time, and removes itself from the
connection manager:

+    if ( !@result || $result[0] ne 'ok' ) {
+        $self->removeConnection($jidStr);
+        BarnOwl::error( "Error in jabber reconnect: " . join( " ", @result ) );
+        return 0;
+    }

I possibly could see the merit to having it not remove itself, but
for most non-kerberos auth methods, if auth fails once, it's not going
to succeed again in the future.

> Some nits:
> 
> +                $conn->setAuth( $jidStr => {%{ $vars{jlogin_authhash} },
> password => $vars{jlogin_password}} );
> 
> I would break this line, and use a , instead of => after '$jidStr' --
> I find it too easy to misread $jidStr as a key in the hash.

Done, and pushed.
 - Alex
-- 
Networking -- only one letter away from not working

home help back first fref pref prev next nref lref last post