diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-06-30 11:07:02 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2021-06-30 11:23:22 +0200 |
commit | 817a6bff54217e12444cb2d6dba1c0741918e578 (patch) | |
tree | ff6a5f77cfa0baec6f57953f76534e4a453281d4 /src/ui/console.c | |
parent | ef96bea82e945d2c00426cac21b6578fdce62eb2 (diff) | |
download | profani-tty-817a6bff54217e12444cb2d6dba1c0741918e578.tar.gz |
XEP-0157: Print all available addresses
Diffstat (limited to 'src/ui/console.c')
-rw-r--r-- | src/ui/console.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index f3993424..59e24891 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -837,9 +837,14 @@ cons_show_disco_items(GSList* items, const char* const jid) cons_alert(NULL); } -static void _cons_print_contact_information_item(gpointer key, gpointer value, gpointer userdata) +static void _cons_print_contact_information_item(gpointer data, gpointer user_data) { - cons_show("%s: %s", (char*)key, (char*)value); + cons_show("%s: %s", (char*)user_data, (char*)data); +} + +static void _cons_print_contact_information_hashlist_item(gpointer key, gpointer value, gpointer userdata) +{ + g_slist_foreach((GSList*)value, _cons_print_contact_information_item, key); } void @@ -848,7 +853,7 @@ cons_show_disco_contact_information(GHashTable* addresses) cons_show(""); cons_show("Server contact information:"); - g_hash_table_foreach(addresses, _cons_print_contact_information_item, NULL); + g_hash_table_foreach(addresses, _cons_print_contact_information_hashlist_item, NULL); } void |