aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-11-02 09:52:35 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-02 09:52:35 (GMT)
commit3f134b4357a02edf025224c8efcf8ab0e6fe006d (patch)
tree7bcf689b90fca053028db95a1cdea4e7ee98883b /hostapd
parentb253e6ff55cd11f1239d82e1e3e61d3190e824b2 (diff)
downloadhostap-3f134b4357a02edf025224c8efcf8ab0e6fe006d.zip
hostap-3f134b4357a02edf025224c8efcf8ab0e6fe006d.tar.gz
hostap-3f134b4357a02edf025224c8efcf8ab0e6fe006d.tar.bz2
hostapd: Accept RELOG from global control interface
This makes it easier to recycle log file (-f) when no active interface is in use. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/ctrl_iface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 0d89992..e6758d9 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1,6 +1,6 @@
/*
* hostapd / UNIX domain socket -based control interface
- * Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2004-2013, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
@@ -1494,6 +1494,7 @@ static void hostapd_global_ctrl_iface_receive(int sock, void *eloop_ctx,
return;
}
buf[res] = '\0';
+ wpa_printf(MSG_DEBUG, "Global ctrl_iface command: %s", buf);
os_memcpy(reply, "OK\n", 3);
reply_len = 3;
@@ -1501,6 +1502,9 @@ static void hostapd_global_ctrl_iface_receive(int sock, void *eloop_ctx,
if (os_strcmp(buf, "PING") == 0) {
os_memcpy(reply, "PONG\n", 5);
reply_len = 5;
+ } else if (os_strncmp(buf, "RELOG", 5) == 0) {
+ if (wpa_debug_reopen_file() < 0)
+ reply_len = -1;
} else if (os_strncmp(buf, "ADD ", 4) == 0) {
if (hostapd_ctrl_iface_add(interfaces, buf + 4) < 0)
reply_len = -1;