X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=blobdiff_plain;f=wpa_supplicant%2Fconfig_none.c;h=2aac28fa3d172c536c142b560fb40ed08e6ba2fb;hp=2e9ccc0a283544e86a916bdfcc2a9053dac2283f;hb=e8afaad7fd9a7fc9a761ed2f8a117bbb6ac9c730;hpb=6fc6879bd55a394f807cbbe927df736c190cb8ab diff --git a/wpa_supplicant/config_none.c b/wpa_supplicant/config_none.c index 2e9ccc0..2aac28f 100644 --- a/wpa_supplicant/config_none.c +++ b/wpa_supplicant/config_none.c @@ -2,14 +2,8 @@ * WPA Supplicant / Configuration backend: empty starting point * Copyright (c) 2003-2005, Jouni Malinen * - * 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 @@ -23,11 +17,16 @@ #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 */