/soc/2015/jgeboski/facebook: 0e87176c6292: facebook: do not auto...
James Geboski
jgeboski at gmail.com
Mon Aug 24 19:58:01 EDT 2015
Changeset: 0e87176c6292042e013b8b52c9184ad1ffca1fce
Author: James Geboski <jgeboski at gmail.com>
Date: 2015-08-24 19:57 -0400
Branch: facebook
URL: https://hg.pidgin.im/soc/2015/jgeboski/facebook/rev/0e87176c6292
Description:
facebook: do not auto close the MQTT connection on error
diffstat:
libpurple/protocols/facebook/api.c | 2 +-
libpurple/protocols/facebook/mqtt.c | 12 +++++-------
2 files changed, 6 insertions(+), 8 deletions(-)
diffs (50 lines):
diff --git a/libpurple/protocols/facebook/api.c b/libpurple/protocols/facebook/api.c
--- a/libpurple/protocols/facebook/api.c
+++ b/libpurple/protocols/facebook/api.c
@@ -349,7 +349,7 @@ fb_api_class_init(FbApiClass *klass)
* @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),
diff --git a/libpurple/protocols/facebook/mqtt.c b/libpurple/protocols/facebook/mqtt.c
--- a/libpurple/protocols/facebook/mqtt.c
+++ b/libpurple/protocols/facebook/mqtt.c
@@ -105,8 +105,8 @@ fb_mqtt_class_init(FbMqttClass *klass)
* @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 @@ fb_mqtt_error(FbMqtt *mqtt, FbMqttError
va_end(ap);
g_signal_emit_by_name(mqtt, "error", err);
- fb_mqtt_close(mqtt);
g_error_free(err);
}
@@ -601,12 +600,11 @@ fb_mqtt_cb_open_error(PurpleSslConnectio
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
More information about the Commits
mailing list