D-Bus: Fix WPS ConfigMethods getter to handle no value properly
wpas_dbus_simple_property_getter() cannot be used with NULL DBUS_TYPE_STRING, so replace that with an empty string to handle the case of no config_methods parameter in the configuration. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
11973b2682
commit
d20be3a739
1 changed files with 2 additions and 0 deletions
|
@ -408,6 +408,8 @@ dbus_bool_t wpas_dbus_getter_config_methods(DBusMessageIter *iter,
|
|||
struct wpa_supplicant *wpa_s = user_data;
|
||||
char *methods = wpa_s->conf->config_methods;
|
||||
|
||||
if (methods == NULL)
|
||||
methods = "";
|
||||
return wpas_dbus_simple_property_getter(iter, DBUS_TYPE_STRING,
|
||||
&methods, error);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue