Mercurial > pidgin
comparison libpurple/protocols/oscar/flap_connection.c @ 22167:ce5ced43cd93
Undo revision accb4afcd6bbf17cf99d9aac0b4b448293190647. This should
also not be necessary. If the gc doesn't exist but the FlapConnection
does then that's bad and is a sign of a serious bug that should be
fixed correctly. If you have a crash that you think this fixes, feel
free to show me a backtrace.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 21 Jan 2008 07:32:49 +0000 |
parents | 23d85a181575 |
children | 6419554aadd9 |
comparison
equal
deleted
inserted
replaced
22166:23d85a181575 | 22167:ce5ced43cd93 |
---|---|
358 PurpleAccount *account; | 358 PurpleAccount *account; |
359 aim_rxcallback_t userfunc; | 359 aim_rxcallback_t userfunc; |
360 | 360 |
361 conn = data; | 361 conn = data; |
362 od = conn->od; | 362 od = conn->od; |
363 account = (PURPLE_CONNECTION_IS_VALID(od->gc) ? purple_connection_get_account(od->gc) : NULL); | 363 account = purple_connection_get_account(od->gc); |
364 | 364 |
365 purple_debug_info("oscar", "Destroying oscar connection of " | 365 purple_debug_info("oscar", "Destroying oscar connection of " |
366 "type 0x%04hx. Disconnect reason is %d\n", | 366 "type 0x%04hx. Disconnect reason is %d\n", |
367 conn->type, conn->disconnect_reason); | 367 conn->type, conn->disconnect_reason); |
368 | 368 |
373 | 373 |
374 /* | 374 /* |
375 * TODO: If we don't have a SNAC_FAMILY_LOCATE connection then | 375 * TODO: If we don't have a SNAC_FAMILY_LOCATE connection then |
376 * we should try to request one instead of disconnecting. | 376 * we should try to request one instead of disconnecting. |
377 */ | 377 */ |
378 if (account && !account->disconnecting && | 378 if (!account->disconnecting && ((od->oscar_connections == NULL) |
379 ((od->oscar_connections == NULL) || (!flap_connection_getbytype(od, SNAC_FAMILY_LOCATE)))) | 379 || (!flap_connection_getbytype(od, SNAC_FAMILY_LOCATE)))) |
380 { | 380 { |
381 /* No more FLAP connections! Sign off this PurpleConnection! */ | 381 /* No more FLAP connections! Sign off this PurpleConnection! */ |
382 gchar *tmp; | 382 gchar *tmp; |
383 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; | 383 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
384 | 384 |