From: Jouni Malinen Date: Wed, 31 Dec 2014 13:46:08 +0000 (+0200) Subject: D-Bus: Make WPAS_DBUS_TYPE_BINARRAY value less confusing X-Git-Tag: hostap_2_4~606 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc7baaff24b179b7e52bb7ef6c2a816566828faa;p=thirdparty%2Fhostap.git D-Bus: Make WPAS_DBUS_TYPE_BINARRAY value less confusing Commit 911e97e4002019e577bb1086f1fd02daff978544 ('DBus: Refactor array adding, add binary arrays') introduced WPAS_DBUS_TYPE_BINARRAY as an internal fake type for array_type. However, it selected this value to be (DBUS_NUMBER_OF_TYPES + 100) = 116 = 't'. This happens to conflict with DBUS_TYPE_UINT64 ((int) 't'). While none of the existing array_type use cases supported UINT64, it is much clearer if WPAS_DBUS_TYPE_BINARRAY has a value that does not match any existing DBUS_TYPE_* value. Replace this with '@' (64). Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/dbus/dbus_dict_helpers.h b/wpa_supplicant/dbus/dbus_dict_helpers.h index 96663494a..0699a5e97 100644 --- a/wpa_supplicant/dbus/dbus_dict_helpers.h +++ b/wpa_supplicant/dbus/dbus_dict_helpers.h @@ -120,7 +120,11 @@ dbus_bool_t wpa_dbus_dict_append_wpabuf_array(DBusMessageIter *iter_dict, * Reading a dict from a DBusMessage */ -#define WPAS_DBUS_TYPE_BINARRAY (DBUS_NUMBER_OF_TYPES + 100) +/* + * Used only in struct wpa_dbus_dict_entry::array_type internally to identify + * special binary array case. + */ +#define WPAS_DBUS_TYPE_BINARRAY ((int) '@') struct wpa_dbus_dict_entry { int type; /** the dbus type of the dict entry's value */