diff src/protocols/simple/simple.c @ 11718:11e95968c9ff

[gaim-migrate @ 14009] PRPLs are no longer required to call gaim_account_connect() and gaim_account_disconnect()--it is done in the core. Having the PRPLs do it was kind of silly. And this should allow me to improve the auto-reconnect plugin some. I think. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 22 Oct 2005 20:09:24 +0000
parents 20edc3a05317
children fa742ad8068c
line wrap: on
line diff
--- a/src/protocols/simple/simple.c	Sat Oct 22 19:56:02 2005 +0000
+++ b/src/protocols/simple/simple.c	Sat Oct 22 20:09:24 2005 +0000
@@ -108,21 +108,23 @@
 static void simple_set_status(GaimAccount *account, GaimStatus *status) {
 	GaimStatusPrimitive primitive = gaim_status_type_get_primitive(gaim_status_get_type(status));
 	struct simple_account_data *sip = NULL;
+
 	if (!gaim_status_is_active(status))
 		return;
 
-	if(account->gc) sip = account->gc->proto_data;
-	if(sip) {
+	if (account->gc)
+		sip = account->gc->proto_data;
+
+	if (sip)
+	{
 		g_free(sip->status);
-		if(primitive == GAIM_STATUS_AVAILABLE) sip->status = g_strdup("available");
-		else sip->status = g_strdup("busy");
+		if (primitive == GAIM_STATUS_AVAILABLE)
+			sip->status = g_strdup("available");
+		else
+			sip->status = g_strdup("busy");
 
 		do_notifies(sip);
 	}
-	if ((primitive != GAIM_STATUS_OFFLINE)
-			&& (!gaim_account_is_connected(account))) {
-		gaim_account_connect(account);
-	}
 }
 
 static struct sip_connection *connection_find(struct simple_account_data *sip, int fd) {