# HG changeset patch # User Will Thompson # Date 1192029380 0 # Node ID c560286daede9a231a2d26820b5fb3e93cb1a069 # Parent 38d7c849d444ac48247d7248756f4192851727dd Clarify the documentation of the return value of purple_connection_reason_is_fatal, and explain why purple_connection_error checks wants_to_die. diff -r 38d7c849d444 -r c560286daede libpurple/connection.c --- a/libpurple/connection.c Tue Oct 09 15:03:48 2007 +0000 +++ b/libpurple/connection.c Wed Oct 10 15:16:20 2007 +0000 @@ -488,6 +488,12 @@ void purple_connection_error(PurpleConnection *gc, const char *text) { + /* prpls that have not been updated to use disconnection reasons will + * be setting wants_to_die before calling this function, so choose + * PURPLE_REASON_OTHER_ERROR (which is fatal) if it's true, and + * PURPLE_REASON_NETWORK_ERROR (which isn't) if not. See the + * documentation in connection.h. + */ PurpleDisconnectReason reason = gc->wants_to_die ? PURPLE_REASON_OTHER_ERROR : PURPLE_REASON_NETWORK_ERROR; diff -r 38d7c849d444 -r c560286daede libpurple/connection.h --- a/libpurple/connection.h Tue Oct 09 15:03:48 2007 +0000 +++ b/libpurple/connection.h Wed Oct 10 15:16:20 2007 +0000 @@ -429,7 +429,8 @@ * * (This function is meant to replace checking PurpleConnection.wants_to_die.) * - * @return @c TRUE iff automatic reconnection is a bad idea. + * @return @c TRUE if the account should not be automatically reconnected, and + * @c FALSE otherwise. */ gboolean purple_connection_reason_is_fatal (PurpleDisconnectReason reason);