This can be used to include binding information for multiple interfaces
in Windows registry and only use the ones that match with an available
network interface.
HKEY hk;
#define TBUFLEN 255
TCHAR adapter[TBUFLEN], config[TBUFLEN], ctrl_interface[TBUFLEN];
HKEY hk;
#define TBUFLEN 255
TCHAR adapter[TBUFLEN], config[TBUFLEN], ctrl_interface[TBUFLEN];
LONG ret;
struct wpa_interface iface;
LONG ret;
struct wpa_interface iface;
ret = RegOpenKeyEx(_hk, name, 0, KEY_QUERY_VALUE, &hk);
if (ret != ERROR_SUCCESS) {
ret = RegOpenKeyEx(_hk, name, 0, KEY_QUERY_VALUE, &hk);
if (ret != ERROR_SUCCESS) {
iface.confname = (char *) config;
}
iface.confname = (char *) config;
}
+ buflen = sizeof(val);
+ ret = RegQueryValueEx(hk, TEXT("skip_on_error"), NULL, NULL,
+ (LPBYTE) &val, &buflen);
+ if (ret == ERROR_SUCCESS && buflen == sizeof(val))
+ skip_on_error = val;
+
- if (wpa_supplicant_add_iface(global, &iface) == NULL)
- return -1;
+ if (wpa_supplicant_add_iface(global, &iface) == NULL) {
+ if (skip_on_error)
+ wpa_printf(MSG_DEBUG, "Skipped interface '%s' due to "
+ "initialization failure", iface.ifname);
+ else
+ return -1;
+ }
"adapter"="{A7627643-C310-49E5-BD89-7E77709C04AB}"\r
"config"="test"\r
"ctrl_interface"=""\r
"adapter"="{A7627643-C310-49E5-BD89-7E77709C04AB}"\r
"config"="test"\r
"ctrl_interface"=""\r
+"skip_on_error"=dword:00000000\r