From 32d6adb8490af9ad53dd458916c44d3819b3933b Mon Sep 17 00:00:00 2001 From: "Eduardo Lima (Etrunko)" Date: Tue, 28 Oct 2014 17:34:15 -0200 Subject: Fix set_value for string_list keys Change-Id: I4b0478cb1adc9d6f17a0378fa9230c0db7e67def Signed-off-by: Eduardo Lima (Etrunko) --- src/wkb-ibus-config-eet.c | 2 +- src/wkb-ibus-config-key.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/wkb-ibus-config-eet.c b/src/wkb-ibus-config-eet.c index dbcee54..b18d74b 100644 --- a/src/wkb-ibus-config-eet.c +++ b/src/wkb-ibus-config-eet.c @@ -925,7 +925,7 @@ _config_eet_value_changed(struct wkb_ibus_config_eet *config_eet, struct wkb_con array = eldbus_message_iter_container_new(value, 'a', "s"); for (s = slist; *s != NULL; ++s) - eldbus_message_iter_arguments_append(array, "s", s); + eldbus_message_iter_arguments_append(array, "s", *s); eldbus_message_iter_container_close(value, array); diff --git a/src/wkb-ibus-config-key.c b/src/wkb-ibus-config-key.c index 78a2db2..f29db1e 100644 --- a/src/wkb-ibus-config-key.c +++ b/src/wkb-ibus-config-key.c @@ -159,9 +159,16 @@ _key_string_list_set(struct wkb_config_key *key, Eldbus_Message_Iter *iter) const char *str; Eina_List *list = NULL; Eina_List **field; + Eldbus_Message_Iter *array = NULL; - while (iter && eldbus_message_iter_get_and_next(iter, 's', &str)) - list = eina_list_append(list,eina_stringshare_add(str)); + if (!eldbus_message_iter_arguments_get(iter, "as", &array)) + { + ERR("Expecting 'as' got '%s'", eldbus_message_iter_signature_get(iter)); + return EINA_FALSE; + } + + while (eldbus_message_iter_get_and_next(array, 's', &str)) + list = eina_list_append(list, eina_stringshare_add(str)); if ((field = (Eina_List **) key->field)) _key_string_list_free(field); -- cgit v1.2.3