Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/flap_connection.c @ 32827:4a34689eeb33 default tip
merged from im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 19 Nov 2011 14:42:54 +0900 |
parents | ec6371d4cae8 |
children |
comparison
equal
deleted
inserted
replaced
32692:0f94ec89f0bc | 32827:4a34689eeb33 |
---|---|
454 | 454 |
455 /* | 455 /* |
456 * TODO: If we don't have a SNAC_FAMILY_LOCATE connection then | 456 * TODO: If we don't have a SNAC_FAMILY_LOCATE connection then |
457 * we should try to request one instead of disconnecting. | 457 * we should try to request one instead of disconnecting. |
458 */ | 458 */ |
459 if (!account->disconnecting && ((od->oscar_connections == NULL) | 459 if (!purple_account_is_disconnecting(account) && ((od->oscar_connections == NULL) |
460 || (!flap_connection_getbytype(od, SNAC_FAMILY_LOCATE)))) | 460 || (!flap_connection_getbytype(od, SNAC_FAMILY_LOCATE)))) |
461 { | 461 { |
462 /* No more FLAP connections! Sign off this PurpleConnection! */ | 462 /* No more FLAP connections! Sign off this PurpleConnection! */ |
463 gchar *tmp; | 463 gchar *tmp; |
464 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; | 464 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
919 /* Error! */ | 919 /* Error! */ |
920 flap_connection_schedule_destroy(conn, | 920 flap_connection_schedule_destroy(conn, |
921 OSCAR_DISCONNECT_LOST_CONNECTION, g_strerror(errno)); | 921 OSCAR_DISCONNECT_LOST_CONNECTION, g_strerror(errno)); |
922 break; | 922 break; |
923 } | 923 } |
924 conn->od->gc->last_received = time(NULL); | 924 purple_connection_update_last_received(conn->od->gc); |
925 | 925 |
926 /* If we don't even have a complete FLAP header then do nothing */ | 926 /* If we don't even have a complete FLAP header then do nothing */ |
927 conn->header_received += read; | 927 conn->header_received += read; |
928 if (conn->header_received < 6) | 928 if (conn->header_received < 6) |
929 break; | 929 break; |