im.pidgin.cpw.resiak.disconnectreason: 2c0fa0892b42671d5e81f4b528fc2af2624085b3

resiak at soc.pidgin.im resiak at soc.pidgin.im
Wed Oct 10 11:20:34 EDT 2007


-----------------------------------------------------------------
Revision: 2c0fa0892b42671d5e81f4b528fc2af2624085b3
Ancestor: e6345a558603f231b12cc7c4bac3f6bdbaa26635
Author: resiak at soc.pidgin.im
Date: 2007-10-10T15:16:20
Branch: im.pidgin.cpw.resiak.disconnectreason

Modified files:
        libpurple/connection.c libpurple/connection.h

ChangeLog: 

Clarify the documentation of the return value of
purple_connection_reason_is_fatal, and explain why purple_connection_error
checks wants_to_die.

-------------- next part --------------
============================================================
--- libpurple/connection.c	fc01c2829ad61d81db7fd8e72625f9cf4a98329d
+++ libpurple/connection.c	d0935204e5b050b7efd7f0bc029ceafaf2689dc8
@@ -488,6 +488,12 @@ purple_connection_error(PurpleConnection
 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;
============================================================
--- libpurple/connection.h	23a623556ef0a41f710947004cbef501ce9c3df5
+++ libpurple/connection.h	94941da803533e1cb7325ac919d0ebed0d869cf9
@@ -429,7 +429,8 @@ purple_connection_ssl_error (PurpleConne
  *
  * (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);


More information about the Commits mailing list