/soc/2013/ankitkv/gobjectification: abb9d842c1f0: Removed purple...

Ankit Vani a at nevitus.org
Sat Jul 27 06:52:33 EDT 2013


Changeset: abb9d842c1f0b1cb06041973d210ddcb2651980b
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-07-27 16:22 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/abb9d842c1f0

Description:

Removed purple_connection_disable_reconnection(). Used purple_connection_error() in jabber's queried registration success.

diffstat:

 libpurple/connection.c              |  9 ---------
 libpurple/connection.h              |  9 ---------
 libpurple/protocols/jabber/jabber.c |  3 ++-
 3 files changed, 2 insertions(+), 19 deletions(-)

diffs (53 lines):

diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -550,15 +550,6 @@ void purple_connection_update_last_recei
 	priv->last_received = time(NULL);
 }
 
-void purple_connection_disable_reconnection(PurpleConnection *gc)
-{
-	PurpleConnectionPrivate *priv = PURPLE_CONNECTION_GET_PRIVATE(gc);
-
-	g_return_if_fail(priv != NULL);
-
-	priv->wants_to_die = TRUE;
-}
-
 /**************************************************************************
  * GBoxed code
  **************************************************************************/
diff --git a/libpurple/connection.h b/libpurple/connection.h
--- a/libpurple/connection.h
+++ b/libpurple/connection.h
@@ -463,15 +463,6 @@ purple_connection_error_is_fatal (Purple
  */
 void purple_connection_update_last_received(PurpleConnection *gc);
 
-/**
- * Disables reconnection after the connection disconnects.
- * Called by prpls in handling of queries for user registration. This is not
- * required when implementing prpl_info->register_user.
- *
- * @param gc   The connection.
- */
-void purple_connection_disable_reconnection(PurpleConnection *gc);
-
 /*@}*/
 
 /**************************************************************************/
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -1377,9 +1377,10 @@ void jabber_register_parse(JabberStream 
 				g_free(href);
 
 				if(js->registration) {
-					purple_connection_disable_reconnection(js->gc);
 					/* succeeded, but we have no login info */
 					purple_account_register_completed(account, TRUE);
+					purple_connection_error(js->gc, PURPLE_CONNECTION_ERROR_OTHER_ERROR,
+							_("Registration completed successfully. Please reconnect to continue."));
 					jabber_connection_schedule_close(js);
 				}
 				return;



More information about the Commits mailing list