Allow application handlers on stream errors, before closing down the connection.
authorSenko Rasic <senko.rasic@collabora.co.uk>
Tue, 30 Oct 2007 23:51:18 +0100
changeset 311 153357413e1b
parent 310 8cfd2c340b9a
child 312 2a467914cea5
Allow application handlers on stream errors, before closing down the connection.
loudmouth/lm-connection.c
--- 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);