Updated through tag hostap_2_5 from git://w1.fi/hostap.git
[mech_eap.git] / libeap / wpa_supplicant / config_none.c
index 2e9ccc0..2aac28f 100644 (file)
@@ -2,14 +2,8 @@
  * WPA Supplicant / Configuration backend: empty starting point
  * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
  *
  * This file implements dummy example of a configuration backend. None of the
  * functions are actually implemented so this can be used as a simple
 #include "base64.h"
 
 
-struct wpa_config * wpa_config_read(const char *name)
+struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp)
 {
        struct wpa_config *config;
 
-       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;
        /* TODO: fill in configuration data */