*/
static void hostapd_cleanup(struct hostapd_data *hapd)
{
- wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
+ wpa_printf(MSG_DEBUG, "%s(hapd=%p (%s))", __func__, hapd,
+ hapd->conf->iface);
if (hapd->iface->interfaces &&
hapd->iface->interfaces->ctrl_iface_deinit)
hapd->iface->interfaces->ctrl_iface_deinit(hapd);
hostapd_free_hapd_data(hapd);
+ hapd->started = 0;
}
char force_ifname[IFNAMSIZ];
u8 if_addr[ETH_ALEN];
+ wpa_printf(MSG_DEBUG, "%s(hapd=%p (%s), first=%d)",
+ __func__, hapd, hapd->conf->iface, first);
+
+ if (hapd->started) {
+ wpa_printf(MSG_ERROR, "%s: Interface %s was already started",
+ __func__, hapd->conf->iface);
+ return -1;
+ }
+ hapd->started = 1;
+
if (!first || first == -1) {
if (hostapd_mac_comp_empty(hapd->conf->bssid) == 0) {
/* Allocate the next available BSSID. */
struct hostapd_config *iconf;
struct hostapd_bss_config *conf;
int interface_added; /* virtual interface added for this BSS */
+ unsigned int started:1;
u8 own_addr[ETH_ALEN];