dbus: Close dbus dict just after appending data
Before fixing this issue, calling wpas_dbus_getter_p2p_device_config was causing early termination of dbus connection, due to writing values to an already closed dict. Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
This commit is contained in:
parent
b8d87ed296
commit
4aa9c156e5
1 changed files with 4 additions and 4 deletions
|
@ -830,15 +830,15 @@ dbus_bool_t wpas_dbus_getter_p2p_device_config(DBusMessageIter *iter,
|
||||||
wpa_s->conf->p2p_no_group_iface))
|
wpa_s->conf->p2p_no_group_iface))
|
||||||
goto err_no_mem;
|
goto err_no_mem;
|
||||||
|
|
||||||
if (!wpa_dbus_dict_close_write(&variant_iter, &dict_iter) ||
|
|
||||||
!dbus_message_iter_close_container(iter, &variant_iter))
|
|
||||||
goto err_no_mem;
|
|
||||||
|
|
||||||
/* P2P Search Delay */
|
/* P2P Search Delay */
|
||||||
if (!wpa_dbus_dict_append_uint32(&dict_iter, "p2p_search_delay",
|
if (!wpa_dbus_dict_append_uint32(&dict_iter, "p2p_search_delay",
|
||||||
wpa_s->conf->p2p_search_delay))
|
wpa_s->conf->p2p_search_delay))
|
||||||
goto err_no_mem;
|
goto err_no_mem;
|
||||||
|
|
||||||
|
if (!wpa_dbus_dict_close_write(&variant_iter, &dict_iter) ||
|
||||||
|
!dbus_message_iter_close_container(iter, &variant_iter))
|
||||||
|
goto err_no_mem;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
err_no_mem:
|
err_no_mem:
|
||||||
|
|
Loading…
Reference in a new issue