diff options
author | James Booth <boothj5@gmail.com> | 2013-09-22 00:12:20 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-09-22 00:19:11 +0100 |
commit | d0c8ed462ddd32ca23a8162a0e5c21f1f25c887b (patch) | |
tree | 3ab67ff07ec0c153e0380204901320644f357e9b /src | |
parent | 892a9953b47109ef5bd7a0f5b35326d6b57ff3fd (diff) | |
download | profani-tty-d0c8ed462ddd32ca23a8162a0e5c21f1f25c887b.tar.gz |
Add error handler only once
fixes #240
Diffstat (limited to 'src')
-rw-r--r-- | src/xmpp/connection.c | 1 | ||||
-rw-r--r-- | src/xmpp/message.c | 1 | ||||
-rw-r--r-- | src/xmpp/presence.c | 1 |
3 files changed, 1 insertions, 2 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index 5040aa91..40a1ea05 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -484,6 +484,7 @@ _connection_handler(xmpp_conn_t * const conn, chat_sessions_init(); + xmpp_handler_add(conn, connection_error_handler, NULL, NULL, STANZA_TYPE_ERROR, ctx); roster_add_handlers(); message_add_handlers(); presence_add_handlers(); diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 19b4df49..8a977490 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -51,7 +51,6 @@ message_add_handlers(void) xmpp_conn_t * const conn = connection_get_conn(); xmpp_ctx_t * const ctx = connection_get_ctx(); - HANDLE(NULL, STANZA_TYPE_ERROR, connection_error_handler); HANDLE(NULL, STANZA_TYPE_GROUPCHAT, _groupchat_message_handler); HANDLE(NULL, STANZA_TYPE_CHAT, _chat_message_handler); HANDLE(NULL, NULL, _conference_message_handler); diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index 607bb02b..809ddf6f 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -72,7 +72,6 @@ presence_add_handlers(void) xmpp_conn_t * const conn = connection_get_conn(); xmpp_ctx_t * const ctx = connection_get_ctx(); - HANDLE(NULL, STANZA_TYPE_ERROR, connection_error_handler); HANDLE(STANZA_NS_MUC_USER, NULL, _room_presence_handler); HANDLE(NULL, STANZA_TYPE_UNAVAILABLE, _unavailable_handler); HANDLE(NULL, STANZA_TYPE_SUBSCRIBE, _subscribe_handler); |