diff libpurple/connection.c @ 20818:c560286daede

Clarify the documentation of the return value of purple_connection_reason_is_fatal, and explain why purple_connection_error checks wants_to_die.
author Will Thompson <will.thompson@collabora.co.uk>
date Wed, 10 Oct 2007 15:16:20 +0000
parents 38d7c849d444
children 5a3242b676ad
line wrap: on
line diff
--- 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;