Allow application handlers on stream errors, before closing down the connection.
--- a/loudmouth/lm-connection.c Tue Oct 30 23:43:55 2007 +0100
+++ b/loudmouth/lm-connection.c Tue Oct 30 23:51:18 2007 +0100
@@ -259,11 +259,6 @@
goto out;
}
- if (lm_message_get_type (m) == LM_MESSAGE_TYPE_STREAM_ERROR) {
- connection_stream_error (connection, m);
- goto out;
- }
-
if ((lm_message_get_sub_type (m) == LM_MESSAGE_SUB_TYPE_ERROR) ||
(lm_message_get_sub_type (m) == LM_MESSAGE_SUB_TYPE_RESULT)) {
id = lm_message_node_get_attribute (m->node, "id");
@@ -294,6 +289,11 @@
m);
}
+ if (lm_message_get_type (m) == LM_MESSAGE_TYPE_STREAM_ERROR) {
+ connection_stream_error (connection, m);
+ goto out;
+ }
+
out:
lm_connection_unref (connection);