# HG changeset patch
# User Mark Doliner <mark@kingant.net>
# Date 1155795688 0
# Node ID cef7f6a935928794602aef6ce0619f9af1893202
# Parent  694aae55ab6d04085d324fd18c01cc410d0e701b
[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>

diff -r 694aae55ab6d -r cef7f6a93592 src/prpl.c
--- 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