pidgin: 7d9bc7a7: Revert my revision ebc5ac66e700f6c67e300...

markdoliner at pidgin.im markdoliner at pidgin.im
Wed Jun 25 20:05:46 EDT 2008


-----------------------------------------------------------------
Revision: 7d9bc7a7d232a2b83e7923d0d5d20be09ed1fc5c
Ancestor: 7f7111ed9e5924db9e740ad354fce8fb82445b1e
Author: markdoliner at pidgin.im
Date: 2008-06-26T00:01:52
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7d9bc7a7d232a2b83e7923d0d5d20be09ed1fc5c

Modified files:
        libpurple/idle.c libpurple/protocols/silc/buddy.c
        libpurple/protocols/silc10/buddy.c

ChangeLog: 

Revert my revision ebc5ac66e700f6c67e30069ee2ebd4bb61f82ec8 because we
think it's causing accounts to not become unidle when they're
disconnected or something.  And change silc to not crash if the
set_idle prpl function is called when the gc is not connected.

I'm sure we really only need to check whether one of the silc structures
is null, but I don't have a backtrace on hand and I don't remember which
one it was crashing on, so I'm just going to check all of them.

-------------- next part --------------
============================================================
--- libpurple/idle.c	41bbad7572d5e6af2ea72a6b39fa6651dd3cbf26
+++ libpurple/idle.c	4c2f40738284bcb7eca06867ba0f4c3c09771d9b
@@ -252,7 +252,7 @@ signing_off_cb(PurpleConnection *gc, voi
 	PurpleAccount *account;
 
 	account = purple_connection_get_account(gc);
-	idled_accts = g_list_remove(idled_accts, account);
+	set_account_unidle(account);
 }
 
 static void
============================================================
--- libpurple/protocols/silc/buddy.c	9ae58b26db01e069dcd7ebe489e4aae653ba7847
+++ libpurple/protocols/silc/buddy.c	7a08c648fb7c5adfe6f6569338d2fec65e1cc5de
@@ -1434,13 +1434,25 @@ void silcpurple_idle_set(PurpleConnectio
 void silcpurple_idle_set(PurpleConnection *gc, int idle)
 
 {
-	SilcPurple sg = gc->proto_data;
-	SilcClient client = sg->client;
-	SilcClientConnection conn = sg->conn;
+	SilcPurple sg;
+	SilcClient client;
+	SilcClientConnection conn;
 	SilcAttributeObjService service;
 	const char *server;
 	int port;
 
+	sg = gc->proto_data;
+	if (sg == NULL)
+		return;
+
+	client = sg->client;
+	if (client == NULL)
+		return;
+
+	conn = sg->conn;
+	if (conn == NULL)
+		return;
+
 	server = purple_account_get_string(sg->account, "server",
 					 "silc.silcnet.org");
 	port = purple_account_get_int(sg->account, "port", 706),
============================================================
--- libpurple/protocols/silc10/buddy.c	9efd8b9cc41ff4a4518bd195204a2d6bf9882fa5
+++ libpurple/protocols/silc10/buddy.c	5bde4815ce5af331312f85c7a0d1f275ff9e0e11
@@ -1434,13 +1434,25 @@ void silcpurple_idle_set(PurpleConnectio
 void silcpurple_idle_set(PurpleConnection *gc, int idle)
 
 {
-	SilcPurple sg = gc->proto_data;
-	SilcClient client = sg->client;
-	SilcClientConnection conn = sg->conn;
+	SilcPurple sg;
+	SilcClient client;
+	SilcClientConnection conn;
 	SilcAttributeObjService service;
 	const char *server;
 	int port;
 
+	sg = gc->proto_data;
+	if (sg == NULL)
+		return;
+
+	client = sg->client;
+	if (client == NULL)
+		return;
+
+	conn = sg->conn;
+	if (conn == NULL)
+		return;
+
 	server = purple_account_get_string(sg->account, "server",
 					 "silc.silcnet.org");
 	port = purple_account_get_int(sg->account, "port", 706),


More information about the Commits mailing list