Patchwork Replace printf with wpa_printf debug message

login
register
mail settings
Submitter Dmitry Shmidt
Date Oct. 7, 2013, 8:03 p.m.
Message ID <20131007200512.9A87513FCB7@ushik.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/281262/
State Accepted
Commit 24d110dca319fec80dffb6d50691e3ed559b4911
Headers show

Comments

Dmitry Shmidt - Oct. 7, 2013, 8:03 p.m.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
---
 src/ap/ieee802_1x.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Jouni Malinen - Oct. 14, 2013, 6:18 p.m.
On Mon, Oct 07, 2013 at 01:03:25PM -0700, Dmitry Shmidt wrote:
> diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c
> -		printf("Could not set station " MACSTR " flags for kernel "
> -		       "driver (errno=%d).\n", MAC2STR(sta->addr), errno);
> +		wpa_printf(MSG_DEBUG, "Could not set station " MACSTR " flags "
> +			   "for kernel driver (errno=%d).\n",
> +			   MAC2STR(sta->addr), errno);

Thanks, applied with the '\n' removed (wpa_printf() adds it
automatically).

Patch

diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c
index 01fcf2c..f1b076c 100644
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
@@ -96,8 +96,9 @@  void ieee802_1x_set_sta_authorized(struct hostapd_data *hapd,
 	}
 
 	if (res && errno != ENOENT) {
-		printf("Could not set station " MACSTR " flags for kernel "
-		       "driver (errno=%d).\n", MAC2STR(sta->addr), errno);
+		wpa_printf(MSG_DEBUG, "Could not set station " MACSTR " flags "
+			   "for kernel driver (errno=%d).\n",
+			   MAC2STR(sta->addr), errno);
 	}
 
 	if (authorized) {