diff libpurple/protocols/mxit/login.c @ 28990:97900b3b55ca

This fixes a crash when attempting to register a new account and failing because "Your cellphone number is invalid, please correct it and try again."
author Mark Doliner <mark@kingant.net>
date Sun, 22 Nov 2009 18:38:31 +0000
parents 95f8e7fb1f67
children 5f80ab7ac183
line wrap: on
line diff
--- a/libpurple/protocols/mxit/login.c	Sun Nov 22 18:22:18 2009 +0000
+++ b/libpurple/protocols/mxit/login.c	Sun Nov 22 18:38:31 2009 +0000
@@ -142,8 +142,10 @@
 		session->http_timer_id = purple_timeout_add_seconds( 2, mxit_manage_polling, session );
 	}
 
-	/* start the tx queue manager timer */
-	session->q_timer = purple_timeout_add_seconds( 2, mxit_manage_queue, session );
+	/* This timer might already exist if we're registering a new account */
+	if ( session->q_timer == 0 )
+		/* start the tx queue manager timer */
+		session->q_timer = purple_timeout_add_seconds( 2, mxit_manage_queue, session );
 }