aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2012-04-06 09:10:36 (GMT)
committerJouni Malinen <j@w1.fi>2012-04-06 09:10:36 (GMT)
commit9d0537479695fd298dedb44afc7bae49d063e8d2 (patch)
tree8adb359cbcaae3fb281da7ee63e0c6c5a946bf92 /wpa_supplicant
parentbae489d292a3df75ad22d5cc8858e269c6bdf759 (diff)
downloadhostap-9d0537479695fd298dedb44afc7bae49d063e8d2.zip
hostap-9d0537479695fd298dedb44afc7bae49d063e8d2.tar.gz
hostap-9d0537479695fd298dedb44afc7bae49d063e8d2.tar.bz2
Make bind failure messages unique
This helps someone know which part of the code is complaining. Signed-hostap: Ben Greear <greearb@candelatech.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ctrl_iface_unix.c7
-rw-r--r--wpa_supplicant/wpa_priv.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index 6513604..7bebcb8 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -375,7 +375,7 @@ wpa_supplicant_ctrl_iface_init(struct wpa_supplicant *wpa_s)
}
if (bind(priv->sock, (struct sockaddr *) &addr,
sizeof(addr)) < 0) {
- perror("bind(PF_UNIX)");
+ perror("supp-ctrl-iface-init: bind(PF_UNIX)");
goto fail;
}
wpa_printf(MSG_DEBUG, "Successfully replaced leftover "
@@ -667,7 +667,8 @@ wpa_supplicant_global_ctrl_iface_init(struct wpa_global *global)
os_strlcpy(addr.sun_path, global->params.ctrl_interface,
sizeof(addr.sun_path));
if (bind(priv->sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
- perror("bind(PF_UNIX)");
+ perror("supp-global-ctrl-iface-init (will try fixup): "
+ "bind(PF_UNIX)");
if (connect(priv->sock, (struct sockaddr *) &addr,
sizeof(addr)) < 0) {
wpa_printf(MSG_DEBUG, "ctrl_iface exists, but does not"
@@ -682,7 +683,7 @@ wpa_supplicant_global_ctrl_iface_init(struct wpa_global *global)
}
if (bind(priv->sock, (struct sockaddr *) &addr,
sizeof(addr)) < 0) {
- perror("bind(PF_UNIX)");
+ perror("supp-glb-iface-init: bind(PF_UNIX)");
goto fail;
}
wpa_printf(MSG_DEBUG, "Successfully replaced leftover "
diff --git a/wpa_supplicant/wpa_priv.c b/wpa_supplicant/wpa_priv.c
index 74476e2..ad6a080 100644
--- a/wpa_supplicant/wpa_priv.c
+++ b/wpa_supplicant/wpa_priv.c
@@ -643,7 +643,7 @@ wpa_priv_interface_init(const char *dir, const char *params)
}
if (bind(iface->fd, (struct sockaddr *) &addr,
sizeof(addr)) < 0) {
- perror("bind(PF_UNIX)");
+ perror("wpa-priv-iface-init: bind(PF_UNIX)");
goto fail;
}
wpa_printf(MSG_DEBUG, "Successfully replaced leftover "