diff src/prpl.c @ 14162:cef7f6a93592

[gaim-migrate @ 16810] sf patch #1541754, from Sadrul Habib Chowdhury "Setting an account to 'offline' while it is connecting doesn't cause the connection to stop. This patch fixes that." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 17 Aug 2006 06:21:28 +0000
parents 8bda65b88e49
children
line wrap: on
line diff
--- a/src/prpl.c	Thu Aug 17 05:47:58 2006 +0000
+++ b/src/prpl.c	Thu Aug 17 06:21:28 2006 +0000
@@ -171,6 +171,12 @@
 		return;
 	}
 
+	if (!gaim_status_is_online(new_status))
+	{
+		if (!gaim_account_is_disconnected(account))
+			gaim_account_disconnect(account);
+		return;
+	}
 
 	if (gaim_account_is_connecting(account))
 		/*
@@ -191,13 +197,6 @@
 	{
 		prpl_info->set_status(account, new_status);
 	}
-
-	if (!gaim_status_is_online(new_status))
-	{
-		if (!gaim_account_is_disconnected(account))
-			gaim_account_disconnect(account);
-		return;
-	}
 }
 
 void