pidgin/pidgin

0e87176c6292
Parents c92bc4233941
Children a276fbb29d85
facebook: do not auto close the MQTT connection on error
--- a/libpurple/protocols/facebook/api.c Mon Aug 24 19:34:23 2015 -0400
+++ b/libpurple/protocols/facebook/api.c Mon Aug 24 19:57:50 2015 -0400
@@ -349,7 +349,7 @@
* @error: The #GError.
*
* Emitted whenever an error is hit within the #FbApi. This
- * should disconnect #FbApi with #fb_api_disconnect().
+ * should disconnect the #FbApi with #fb_api_disconnect().
*/
g_signal_new("error",
G_TYPE_FROM_CLASS(klass),
--- a/libpurple/protocols/facebook/mqtt.c Mon Aug 24 19:34:23 2015 -0400
+++ b/libpurple/protocols/facebook/mqtt.c Mon Aug 24 19:57:50 2015 -0400
@@ -105,8 +105,8 @@
* @mqtt: The #FbMqtt.
* @error: The #GError.
*
- * Emitted whenever an error is hit within the #FbMqtt. The
- * connection is automatically closed after this is emitted.
+ * Emitted whenever an error is hit within the #FbMqtt. This
+ * should close the #FbMqtt with #fb_mqtt_close().
*/
g_signal_new("error",
G_TYPE_FROM_CLASS(klass),
@@ -282,7 +282,6 @@
va_end(ap);
g_signal_emit_by_name(mqtt, "error", err);
- fb_mqtt_close(mqtt);
g_error_free(err);
}
@@ -601,12 +600,11 @@
str = purple_ssl_strerror(error);
err = g_error_new_literal(FB_MQTT_SSL_ERROR, error, str);
+ /* Do not call purple_ssl_close() from the error_func */
+ priv->gsc = NULL;
+
g_signal_emit_by_name(mqtt, "error", err);
g_error_free(err);
-
- /* Do not call purple_ssl_close() from the error_func */
- priv->gsc = NULL;
- fb_mqtt_close(mqtt);
}
void