Message ID | 1251396920-3954-1-git-send-email-brian@cozybit.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Thu, 2009-08-27 at 11:15 -0700, Brian Cavagnolo wrote: > NL80211_STA_INFO_PLINK_STATE is a u8, not a u16. This bug was causing > unexpected output on big endian machines. Applied, thanks. johannes
diff --git a/station.c b/station.c index 0fff92d..a4865f9 100644 --- a/station.c +++ b/station.c @@ -127,7 +127,7 @@ static int print_sta_handler(struct nl_msg *msg, void *arg) printf("\n\tmesh plid:\t%d", nla_get_u16(sinfo[NL80211_STA_INFO_PLID])); if (sinfo[NL80211_STA_INFO_PLINK_STATE]) { - switch (nla_get_u16(sinfo[NL80211_STA_INFO_PLINK_STATE])) { + switch (nla_get_u8(sinfo[NL80211_STA_INFO_PLINK_STATE])) { case LISTEN: strcpy(state_name, "LISTEN"); break;
NL80211_STA_INFO_PLINK_STATE is a u8, not a u16. This bug was causing unexpected output on big endian machines. Signed-off-by: Brian Cavagnolo <brian@cozybit.com> --- station.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)