aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-31 08:45:50 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-31 08:47:31 (GMT)
commit2544394406424f0157b3e3a259a57a4b0fb0b202 (patch)
tree9238e4124fc8d4ef55bca8222cd84374a319dda9 /wpa_supplicant/dbus/dbus_new_handlers_p2p.c
parent9c4694ce7ca3cd4bffe9c4b0097e7e254fb3bb75 (diff)
downloadhostap-2544394406424f0157b3e3a259a57a4b0fb0b202.zip
hostap-2544394406424f0157b3e3a259a57a4b0fb0b202.tar.gz
hostap-2544394406424f0157b3e3a259a57a4b0fb0b202.tar.bz2
D-Bus: Fix ServiceDiscoveryResponse to accept int32 dialog_token
The ServiceDiscoveryRequest signal uses int32 for encoding dialog_token for some reason (even though this is a u8 field). ServiceDiscoveryResponse is supposed to accept the values from the signal as-is, so extend that to accept int32 in addition to the previously used uint32. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers_p2p.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers_p2p.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index 1a17e65..b1238ad 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
@@ -2638,7 +2638,8 @@ DBusMessage * wpas_dbus_handler_p2p_service_sd_res(
entry.type == DBUS_TYPE_INT32) {
freq = entry.uint32_value;
} else if (!os_strcmp(entry.key, "dialog_token") &&
- entry.type == DBUS_TYPE_UINT32) {
+ (entry.type == DBUS_TYPE_UINT32 ||
+ entry.type == DBUS_TYPE_INT32)) {
dlg_tok = entry.uint32_value;
} else if (!os_strcmp(entry.key, "tlvs")) {
if (entry.type != DBUS_TYPE_ARRAY ||