diff options
author | James Booth <boothj5@gmail.com> | 2015-05-06 22:02:50 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-05-06 22:02:50 +0100 |
commit | 5067e565e32e8035c109718e78cd11299973fb26 (patch) | |
tree | 3809f61dbe42ee1680bbf792ac7c3f3f6a5348fd | |
parent | d52f86ef0fe6a7e88c218df5b9802d7901704c57 (diff) | |
download | profani-tty-5067e565e32e8035c109718e78cd11299973fb26.tar.gz |
Set ui nonblocking on presence updates
Speeds up joining rooms, and connecting.
-rw-r--r-- | src/xmpp/presence.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index efb2e32d..45513ac8 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -472,6 +472,8 @@ static int _unavailable_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata) { + ui_input_nonblocking(TRUE); + const char *jid = xmpp_conn_get_jid(conn); char *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM); log_debug("Unavailable presence handler fired for %s", from); @@ -547,6 +549,8 @@ static int _available_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata) { + ui_input_nonblocking(TRUE); + // handler still fires if error if (g_strcmp0(xmpp_stanza_get_type(stanza), STANZA_TYPE_ERROR) == 0) { return 1; @@ -637,6 +641,8 @@ _send_caps_request(char *node, char *caps_key, char *id, char *from) static int _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata) { + ui_input_nonblocking(TRUE); + char *type = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_TYPE); char *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM); |