Revision 6d1ef619baf3d738285880ef745ddd512d6e97bb
Etan Reisner
pidgin at unreliablesource.net
Fri Jun 22 10:37:00 EDT 2007
On Fri, Jun 22, 2007 at 10:18:22AM -0400, Evan Schoenberg wrote:
> Quoting Etan Reisner <pidgin at unreliablesource.net>:
<snip>
> >One more question: Even given the new way this is being done with using
> >the GaimAccount to store things, what is the purpose of this
> >change/callback? What is the usage? What is it making possible?
>
> It's Andy's code and changes, and I've been out of touch, but I can
> tell you what the problem was before: After a successful registration,
> the user is notified that all went well through a generic notify
> callback... and then nothing else happens.
>
> A better response to a successful registration is to connect the
> now-registered account (no prompting for a password is necessary,
> since the user just entered it; however, this should not automatically
> save the password). A callback allows this behavior.
>
> One could have parsed the generic notify message of 'registration
> successful' to hack in an automatic connect... but that's obviously
> ugly.
So the point of this change was just to make accounts sign on after a
succesful registration? If so, could this not have been equally well
solved by simply making jabber.c:jabber_registration_result_cb attempt to
log the account in as well as disconnecting the registration connection?
(Move jabber_connection_schedule_close() into the else block, and add a jabber_connection_schedule_login() in the if block, where _schedule_login() is defined as:
static void
jabber_connection_schedule_login(JabberStream *js)
{
purple_timeout_add(0, conn_login_cb, js);
}
and conn_login_cb is:
static gboolean
conn_login_cb(gpointer data)
{
JabberStream *js = data;
PurpleAccount *account = purple_connection_get_account(js->gc);
purple_account_disconnect(account);
purple_account_connect(account);
return FALSE;
}
Or did I miss something?
> -Evan
-Etan
More information about the Devel
mailing list