Allow replies to non-iq stanzas. [#22]
This changes so that any stanza type will check if there is a reply handler
waiting for the incoming ID. When implementing for example XEP-0184 (Message
Receipts) there will be returned message stanzas that needs to be given to a
reply handler.
[#22 tagged:committed responsible:Hallski milestone:none state:resolved]
committer: Mikael Hallendal <micke@imendio.com>
--- a/loudmouth/lm-connection.c Mon Oct 06 21:52:49 2008 +0200
+++ b/loudmouth/lm-connection.c Mon Oct 06 21:54:34 2008 +0200
@@ -344,14 +344,10 @@
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)) {
- result = connection_run_message_handler (connection, m);
-
- if (result == LM_HANDLER_RESULT_REMOVE_MESSAGE) {
- goto out;
- }
- }
+ result = connection_run_message_handler (connection, m);
+ if (result == LM_HANDLER_RESULT_REMOVE_MESSAGE) {
+ goto out;
+ }
for (l = connection->handlers[lm_message_get_type (m)];
l && result == LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS;