about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-07-02 17:28:48 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-07-02 17:31:56 +0200
commitd9cfa2e48a9798b920c5b528b662d7e7b8e21a0a (patch)
tree03f88131071339d18862cd41274e09546d55dd39 /src
parentad3dd72325a6854e274c7e9336ed54a52ceac9a0 (diff)
downloadprofani-tty-d9cfa2e48a9798b920c5b528b662d7e7b8e21a0a.tar.gz
message.c: Break out of _message_handler() after handling code
AFAIK it can only be one.
Except at STANZA_NS_MUC_USER which is used in several cases.
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/message.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index 0bb1d4f6..4147a611 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -146,24 +146,28 @@ _message_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *con
         xmpp_stanza_t *conference = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_CONFERENCE);
         if (conference) {
             _handle_conference(stanza);
+            return 1;
         }
 
         // XEP-0158: CAPTCHA Forms
         xmpp_stanza_t *captcha = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_CAPTCHA);
         if (captcha) {
             _handle_captcha(stanza);
+            return 1;
         }
 
         // XEP-0184: Message Delivery Receipts
         xmpp_stanza_t *receipts = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_RECEIPTS);
         if (receipts) {
             _handle_receipt_received(stanza);
+            return 1;
         }
 
         // XEP-0060: Publish-Subscribe
         xmpp_stanza_t *event = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_PUBSUB_EVENT);
         if (event) {
             _handle_pubsub(stanza, event);
+            return 1;
         }
 
         _handle_chat(stanza, FALSE);