Mercurial > pidgin.yaz
changeset 23387:cc1d617308ad
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.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 26 Jun 2008 00:01:52 +0000 |
parents | 6775c08060b9 |
children | 62651e80be28 |
files | libpurple/idle.c libpurple/protocols/silc/buddy.c libpurple/protocols/silc10/buddy.c |
diffstat | 3 files changed, 31 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/idle.c Mon Jun 23 15:33:44 2008 +0000 +++ b/libpurple/idle.c Thu Jun 26 00:01:52 2008 +0000 @@ -252,7 +252,7 @@ PurpleAccount *account; account = purple_connection_get_account(gc); - idled_accts = g_list_remove(idled_accts, account); + set_account_unidle(account); } static void
--- a/libpurple/protocols/silc/buddy.c Mon Jun 23 15:33:44 2008 +0000 +++ b/libpurple/protocols/silc/buddy.c Thu Jun 26 00:01:52 2008 +0000 @@ -1434,13 +1434,25 @@ 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),
--- a/libpurple/protocols/silc10/buddy.c Mon Jun 23 15:33:44 2008 +0000 +++ b/libpurple/protocols/silc10/buddy.c Thu Jun 26 00:01:52 2008 +0000 @@ -1434,13 +1434,25 @@ 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),