diff options
author | James Booth <boothj5@gmail.com> | 2013-03-14 22:18:21 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-03-14 22:18:21 +0000 |
commit | 7bd7c15994b50228b6f494a91daecd706eed9267 (patch) | |
tree | c629457c03c8ac54eac633455908cb5a3ffbc7b4 /src/xmpp | |
parent | 681c3b6be260ecc31c3b62df3f687c69ab9cc2c3 (diff) | |
download | profani-tty-7bd7c15994b50228b6f494a91daecd706eed9267.tar.gz |
Added output for /disco items
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/iq.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 5e71fa5b..fbd1b360 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -495,10 +495,10 @@ _iq_handle_discoitems_result(xmpp_conn_t * const conn, xmpp_stanza_t * const sta const char *stanza_name = NULL; const char *item_jid = NULL; const char *item_name = NULL; + GSList *items = NULL; - if (g_strcmp0(id, "confreq") == 0) { + if ((g_strcmp0(id, "confreq") == 0) || (g_strcmp0(id, "discoitemsreq") == 0)) { log_debug("Response to query: %s", id); - GSList *items = NULL; xmpp_stanza_t *query = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_QUERY); if (query != NULL) { @@ -523,12 +523,15 @@ _iq_handle_discoitems_result(xmpp_conn_t * const conn, xmpp_stanza_t * const sta child = xmpp_stanza_get_next(child); } } + } + if (g_strcmp0(id, "confreq") == 0) { prof_handle_room_list(items, from); - g_slist_free_full(items, free); - } else if ((id != NULL) && (g_strcmp0(id, "discoitemsreq") == 0)) { - cons_show("GOT DISO ITEMS RESULT"); + } else if (g_strcmp0(id, "discoitemsreq") == 0) { + prof_handle_disco_items(items, from); } + g_slist_free_full(items, free); + return 1; } |