aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/main.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-04-29 10:52:34 (GMT)
committerJouni Malinen <j@w1.fi>2013-04-29 10:52:34 (GMT)
commitee28f088a5fdf47d7367abbd83df0fab4dd8149d (patch)
tree16e0126330ee7f57f79b0831ee36bd171672222b /hostapd/main.c
parent61d2ce21af16095f3b4db198b41005841a271a77 (diff)
downloadhostap-ee28f088a5fdf47d7367abbd83df0fab4dd8149d.zip
hostap-ee28f088a5fdf47d7367abbd83df0fab4dd8149d.tar.gz
hostap-ee28f088a5fdf47d7367abbd83df0fab4dd8149d.tar.bz2
hostapd: Add more messages for error paths
Make hostapd more verbose if something goes wrong in interface initialization. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd/main.c')
-rw-r--r--hostapd/main.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/hostapd/main.c b/hostapd/main.c
index 1cd4a4a..fb82a02 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -194,6 +194,8 @@ static struct hostapd_iface * hostapd_init(const char *config_file)
return hapd_iface;
fail:
+ wpa_printf(MSG_ERROR, "Failed to set up interface with %s",
+ config_file);
if (conf)
hostapd_config_free(conf);
if (hapd_iface) {
@@ -652,22 +654,28 @@ int main(int argc, char *argv[])
}
}
- if (hostapd_global_init(&interfaces, entropy_file))
+ if (hostapd_global_init(&interfaces, entropy_file)) {
+ wpa_printf(MSG_ERROR, "Failed to initilize global context");
return -1;
+ }
/* Initialize interfaces */
for (i = 0; i < interfaces.count; i++) {
interfaces.iface[i] = hostapd_interface_init(&interfaces,
argv[optind + i],
debug);
- if (!interfaces.iface[i])
+ if (!interfaces.iface[i]) {
+ wpa_printf(MSG_ERROR, "Failed to initialize interface");
goto out;
+ }
}
hostapd_global_ctrl_iface_init(&interfaces);
- if (hostapd_global_run(&interfaces, daemonize, pid_file))
+ if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
+ wpa_printf(MSG_ERROR, "Failed to start eloop");
goto out;
+ }
ret = 0;