--- a/loudmouth/lm-connection.c Sun Nov 30 09:27:21 2008 +0100
+++ b/loudmouth/lm-connection.c Sun Nov 30 09:49:06 2008 +0100
@@ -191,12 +191,13 @@
{
int i;
- /* This needs to be run before starting to free internal states.
- * It used to be run after the handlers where freed which lead to a crash
- * when the connection was freed prior to running lm_connection_close.
- */
- if (connection->state >= LM_CONNECTION_STATE_OPENING) {
- connection_do_close (connection);
+ /* This needs to be run before starting to free internal states.
+ * It used to be run after the handlers where freed which lead to a
+ * crash when the connection was freed prior to running
+ * lm_connection_close.
+ */
+ if (connection->state >= LM_CONNECTION_STATE_OPENING) {
+ connection_do_close (connection);
}
g_free (connection->server);
--- a/loudmouth/lm-sasl.c Sun Nov 30 09:27:21 2008 +0100
+++ b/loudmouth/lm-sasl.c Sun Nov 30 09:49:06 2008 +0100
@@ -807,27 +807,27 @@
g_free (sasl->server);
if (sasl->features_cb) {
- lm_connection_unregister_message_handler (sasl->connection,
- sasl->features_cb,
- LM_MESSAGE_TYPE_STREAM_FEATURES);
- }
+ lm_connection_unregister_message_handler (sasl->connection,
+ sasl->features_cb,
+ LM_MESSAGE_TYPE_STREAM_FEATURES);
+ }
- if (sasl->challenge_cb) {
- lm_connection_unregister_message_handler (sasl->connection,
- sasl->challenge_cb,
- LM_MESSAGE_TYPE_CHALLENGE);
+ if (sasl->challenge_cb) {
+ lm_connection_unregister_message_handler (sasl->connection,
+ sasl->challenge_cb,
+ LM_MESSAGE_TYPE_CHALLENGE);
}
if (sasl->success_cb) {
- lm_connection_unregister_message_handler (sasl->connection,
- sasl->success_cb,
- LM_MESSAGE_TYPE_SUCCESS);
+ lm_connection_unregister_message_handler (sasl->connection,
+ sasl->success_cb,
+ LM_MESSAGE_TYPE_SUCCESS);
}
if (sasl->failure_cb) {
lm_connection_unregister_message_handler (sasl->connection,
- sasl->failure_cb,
- LM_MESSAGE_TYPE_FAILURE);
+ sasl->failure_cb,
+ LM_MESSAGE_TYPE_FAILURE);
}
g_free (sasl);