comparison libpurple/protocols/silc10/buddy.c @ 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 665e04562de0
children 071414f413a4 cc1e35fa774d
comparison
equal deleted inserted replaced
23386:6775c08060b9 23387:cc1d617308ad
1432 } 1432 }
1433 1433
1434 void silcpurple_idle_set(PurpleConnection *gc, int idle) 1434 void silcpurple_idle_set(PurpleConnection *gc, int idle)
1435 1435
1436 { 1436 {
1437 SilcPurple sg = gc->proto_data; 1437 SilcPurple sg;
1438 SilcClient client = sg->client; 1438 SilcClient client;
1439 SilcClientConnection conn = sg->conn; 1439 SilcClientConnection conn;
1440 SilcAttributeObjService service; 1440 SilcAttributeObjService service;
1441 const char *server; 1441 const char *server;
1442 int port; 1442 int port;
1443
1444 sg = gc->proto_data;
1445 if (sg == NULL)
1446 return;
1447
1448 client = sg->client;
1449 if (client == NULL)
1450 return;
1451
1452 conn = sg->conn;
1453 if (conn == NULL)
1454 return;
1443 1455
1444 server = purple_account_get_string(sg->account, "server", 1456 server = purple_account_get_string(sg->account, "server",
1445 "silc.silcnet.org"); 1457 "silc.silcnet.org");
1446 port = purple_account_get_int(sg->account, "port", 706), 1458 port = purple_account_get_int(sg->account, "port", 706),
1447 1459