wifi_manager_config_get_name(config, &name);
wifi_manager_config_get_security_type(config, &security_type);
- if (__test_compare_ap_name(name, c->name) && security_type == c->type) {
+ if (__test_compare_ap_name(name, c->name) && security_type == (wifi_manager_security_type_e) c->type) {
int rv = wifi_manager_config_remove(wifi, config);
if (rv != WIFI_MANAGER_ERROR_NONE)
printf("Fail to remove configurations [%s]\n", __test_convert_error_to_string(rv));
{ "3", "[Bss]", menu_extension_bss, NULL, NULL},
{ "4", "[IP conflict]", menu_extension_ipconflict, NULL, NULL},
{ "5", "[Netlink scan]", menu_extension_netlinkscan, NULL, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "4", "[Set] mode", NULL, _test_extension_autoconnect_set_mode, NULL},
{ "5", "[Get] state for AP", NULL, _test_extension_autoconnect_get_state_for_ap, NULL},
{ "6", "[Set] state for AP", NULL, _test_extension_autoconnect_set_state_for_ap, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "4", "[Set] state", NULL, _test_extension_autoscan_set_state, NULL},
{ "5", "[Get] mode", NULL, _test_extension_autoscan_get_mode, NULL},
{ "6", "[Set] mode", NULL, _test_extension_autoscan_set_mode, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_extension_set_bssid[] = {
{ "0", "[BSSID]", NULL, NULL, g_bssid},
{ "u", LOG_LIGHTBLUE "[Update]" LOG_END, NULL, _test_extension_set_bssid, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_extension_bss[] = {
{ "1", "[Flush]", NULL, _test_extension_bss_flush, NULL},
{ "2", "[SetBSSID]", menu_extension_set_bssid, NULL, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "1", "[Period] interval for ARP ping", NULL, NULL, g_period},
{ "2", "[Get] period", NULL, _test_extension_ipconflict_get_period, NULL},
{ "3", "[Set] period", NULL, _test_extension_ipconflict_set_period, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "1", "[VSIE] (x.Skip)", NULL, NULL, g_vsie},
{ "2", "[Scan]", NULL, _test_extension_netlinkscan_scan, NULL},
{ "3", "[Scan specific AP]", NULL, _test_extension_netlinkscan_specific_scan, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "v", "[VSIE]", menu_public_vsie, NULL, NULL},
{ "i", "[IP Conflict]", menu_public_ipconflict, NULL, NULL},
{ "d", "[DPP]", menu_public_dpp, NULL, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "6", "[Private Key] (x.Skip)", NULL, NULL, g_eap_private_key},
{ "7", "[Client cert file] (x.Skip)", NULL, NULL, g_eap_client_cert_file},
{ "8", "[Subject match] (x.Skip)", NULL, NULL, g_eap_subject_match},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_config_save[] = {
{ "5", "[Hidden] (0.False/1.True/x.Skip)", NULL, NULL, g_hidden},
{ "6", "[EAP] ", menu_public_config_save_eap, NULL, NULL},
{ "s", LOG_LIGHTBLUE "[Save]" LOG_END, NULL, _test_public_config_save, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_config_remove[] = {
{ "1", "[Name]", NULL, NULL, g_name},
{ "2", "[Security type] (0.None/1.WEP/2.WPA/3.WPA2/4.EAP)", NULL, NULL, g_security},
{ "r", LOG_LIGHTMAGENTA "[Remove]" LOG_END, NULL, _test_public_config_remove, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_config[] = {
{ "1", LOG_LIGHTBLUE "[Load]" LOG_END, NULL, _test_public_config_load, NULL},
{ "2", LOG_LIGHTBLUE "[Save]" LOG_END, menu_public_config_save, NULL, NULL},
{ "3", LOG_LIGHTMAGENTA "[Remove]" LOG_END, menu_public_config_remove, NULL, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "1", "[SSID]", NULL, NULL, g_ssid},
{ "2", "[Passphrase]", NULL, NULL, g_passphrase},
{ "c", LOG_LIGHTBLUE "[Connect]" LOG_END, NULL, _test_public_connect_ap, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_connect_specific_ap[] = {
{ "3", "[Security] (0.NONE/1.WEP/2.WPA/3.WPA2/4.EAP)", NULL, NULL, g_security},
{ "4", "[User name] for EAP", NULL, NULL, g_username},
{ "c", LOG_LIGHTBLUE "[Connect]" LOG_END, NULL, _test_public_connect_specific_ap, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_connect_hidden_ap[] = {
{ "2", "[Passphrase]", NULL, NULL, g_passphrase},
{ "3", "[Security] (0.NONE/1.WEP/2.WPA/3.WPA2)", NULL, NULL, g_security},
{ "c", LOG_LIGHTBLUE "[Connect]" LOG_END, NULL, _test_public_connect_hidden_ap, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_connect_eap_ap[] = {
{ "5", "[Auth type] (0.NONE/1.PAP/2.MSCHAP/3.MSCHAPv2/4.GTC/5.MD5)", NULL, NULL, g_auth_type},
{ "6", "[Certificate file]", NULL, NULL, g_certificate},
{ "c", LOG_LIGHTBLUE "[Connect]" LOG_END, NULL, _test_public_connect_eap_ap, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_connect_wps[] = {
{ "5", "[PBC] without ssid", NULL, _test_public_connect_wps_pbc_without_ssid, NULL},
{ "6", "[PIN] without ssid", NULL, _test_public_connect_wps_pin_without_ssid, NULL},
{ "7", "[Cancel]", NULL, _test_public_connect_wps_cancel, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_connect[] = {
{ "3", "[Hidden AP]", menu_public_connect_hidden_ap, NULL, NULL},
{ "4", "[EAP]", menu_public_connect_eap_ap, NULL, NULL},
{ "5", "[WPS]", menu_public_connect_wps, NULL, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "4", "network role", NULL, _test_public_dpp_get_network_role, NULL},
{ "5", "AKM", NULL, _test_public_dpp_get_akm, NULL},
{ "6", "own URI", NULL, _test_public_dpp_get_own_uri, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_dpp_start[] = {
{ "1", "[Start] configurator responder", NULL, _test_public_dpp_start_configurator_responder, NULL},
{ "2", "[Start] enrollee initiator", NULL, _test_public_dpp_start_enrollee_initiator, NULL},
{ "3", "[Start] enrollee responder", NULL, _test_public_dpp_start_enrollee_responder, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_dpp[] = {
{ "s", LOG_LIGHTBLUE "[Start]" LOG_END, menu_public_dpp_start, NULL, NULL},
{ "t", LOG_LIGHTMAGENTA "[Stop]" LOG_END, NULL, _test_public_dpp_stop, NULL},
{ "g", LOG_LIGHTBLUE "[GET]" LOG_END, menu_public_dpp_get, NULL, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "4", "[Interface name]", NULL, _test_public_get_interface_name, NULL},
{ "5", "[Scan state]", NULL, _test_public_get_scan_state, NULL},
{ "6", "[Module state]", NULL, _test_public_get_module_state, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "1", "[Get] state", NULL, _test_public_ipconflict_get_state, NULL},
{ "2", "[Get] detection mode", NULL, _test_public_ipconflict_get_detect_mode, NULL},
{ "3", "[Set] detection mode", NULL, _test_public_ipconflict_set_detect_mode, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "1", "[SSID]", NULL, NULL, g_ssid},
{ "2", "[Set]", NULL, _test_public_multi_scan_ssid_set, NULL},
{ "3", "[Scan]", NULL, _test_public_multi_scan, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_scan_multi_freq[] = {
{ "1", "[Freq]", NULL, NULL, g_frequency},
{ "2", "[Set]", NULL, _test_public_multi_scan_freq_set, NULL},
{ "3", "[Scan]", NULL, _test_public_multi_scan, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_scan_multi[] = {
{ "1", "[SSID]", menu_public_scan_multi_ssid, _test_public_multi_scan_init, NULL},
{ "2", "[Freq]", menu_public_scan_multi_freq, _test_public_multi_scan_init, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_scan[] = {
{ "1", LOG_LIGHTBLUE "[Scan]" LOG_END, NULL, _test_public_scan, NULL},
{ "2", "[BSSID scan]", NULL, _test_public_bssid_scan, NULL},
{ "3", "[Multi scan]", menu_public_scan_multi, NULL, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "8", "[DNS1 address] (0.Clear/x.Skip)", NULL, NULL, g_dns1_address},
{ "9", "[DNS2 address] (0.Clear/x.Skip)", NULL, NULL, g_dns2_address},
{ "u", LOG_LIGHTBLUE "[Update]" LOG_END, NULL, _test_public_update_ip_method, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_set_proxy[] = {
{ "2", "[Proxy Address type] (0.IPv4/1.IPv6)", NULL, NULL, g_proxy_address_type},
{ "3", "[Proxy address] (0.Clear/x.Skip)", NULL, NULL, g_proxy_address},
{ "u", LOG_LIGHTBLUE "[Update]" LOG_END, NULL, _test_public_update_proxy_method, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
struct menu_data menu_public_set[] = {
{ "1", LOG_LIGHTBLUE "[IP method]" LOG_END, menu_public_set_ip, NULL, NULL},
{ "2", "[Proxy method]", menu_public_set_proxy, NULL, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "5", LOG_LIGHTMAGENTA "[Disconnect]" LOG_END, NULL, _test_public_tdls_disconnect, NULL},
{ "6", "[Enable] channel switch", NULL, _test_public_tdls_enable_channel_switch, NULL},
{ "7", "[Disable] channel switch", NULL, _test_public_tdls_disable_channel_switch, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
{ "2", "[Add]", NULL, _test_public_vsie_add, NULL},
{ "3", "[Get]", NULL, _test_public_vsie_get, NULL},
{ "4", "[Remove]", NULL, _test_public_vsie_remove, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
static struct menu_data menu_main[] = {
{ "1", LOG_LIGHTBLUE "[Public]" LOG_END, menu_public, NULL, NULL},
{ "2", LOG_LIGHTMAGENTA "[Extension]" LOG_END, menu_extension, NULL, NULL},
- { NULL, NULL, },
+ { NULL, NULL, NULL, NULL, NULL },
};
static void __test_device_state_cb(wifi_manager_device_state_e state, void *user_data)
GMainLoop *mainloop = NULL;
GIOChannel *channel = g_io_channel_unix_new(STDIN_FILENO);
MManager *manager;
- struct menu_data init_menu[5] = { {NULL, NULL, NULL, } };
+ struct menu_data init_menu[5] = { {NULL, NULL, NULL, NULL, NULL} };
#if !GLIB_CHECK_VERSION(2, 35, 0)
g_type_init();