aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/config_winreg.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2013-04-23 14:38:57 (GMT)
committerJouni Malinen <j@w1.fi>2013-04-23 14:38:57 (GMT)
commite6304cad47251e88d073553042f1ea7805a858d1 (patch)
tree35560a03a51b8996c186b5a41053cfede366ae68 /wpa_supplicant/config_winreg.c
parentadc96dc2ad3b9eeeb79ea817dd00f01b97f4073a (diff)
downloadhostap-e6304cad47251e88d073553042f1ea7805a858d1.zip
hostap-e6304cad47251e88d073553042f1ea7805a858d1.tar.gz
hostap-e6304cad47251e88d073553042f1ea7805a858d1.tar.bz2
wpa_supplicant: Add option -I for additional config file
This option can be used only for global parameters that are not going to be changed from settings. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'wpa_supplicant/config_winreg.c')
-rw-r--r--wpa_supplicant/config_winreg.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/wpa_supplicant/config_winreg.c b/wpa_supplicant/config_winreg.c
index 2750b63..3cf3a91 100644
--- a/wpa_supplicant/config_winreg.c
+++ b/wpa_supplicant/config_winreg.c
@@ -434,7 +434,7 @@ static int wpa_config_read_networks(struct wpa_config *config, HKEY hk)
}
-struct wpa_config * wpa_config_read(const char *name)
+struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp)
{
TCHAR buf[256];
int errors = 0;
@@ -442,7 +442,12 @@ struct wpa_config * wpa_config_read(const char *name)
HKEY hk;
LONG ret;
- config = wpa_config_alloc_empty(NULL, NULL);
+ if (name == NULL)
+ return NULL;
+ if (cfgp)
+ config = cfgp;
+ else
+ config = wpa_config_alloc_empty(NULL, NULL);
if (config == NULL)
return NULL;
wpa_printf(MSG_DEBUG, "Reading configuration profile '%s'", name);