From 9a8665f939b26476f0fae452bfdea5c865b75d18 Mon Sep 17 00:00:00 2001 From: Jose A Ortega Ruiz Date: Wed, 19 May 2010 14:43:33 +0200 Subject: Fix for issue 23 (compat with iwlib 29) Ignore-this: 8bf9b8b8cd84d4a27dc12cce6ba45121 darcs-hash:20100519124333-748be-a7240313a252438f779e74ff1dcc05a8383b5d9a.gz --- IWlib.hsc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'IWlib.hsc') diff --git a/IWlib.hsc b/IWlib.hsc index 6d8b507..6a8f425 100644 --- a/IWlib.hsc +++ b/IWlib.hsc @@ -60,9 +60,8 @@ getWirelessInfo iface = do hase <- (#peek struct wireless_config, has_essid) wc :: IO CInt eon <- (#peek struct wireless_config, essid_on) wc :: IO CInt essid <- if hase /= 0 && eon /= 0 then - do l <- (#peek struct wireless_config, essid_len) wc - let e = (#ptr struct wireless_config, essid) wc - peekCStringLen (e, fromIntegral (l :: CInt)) + do let e = (#ptr struct wireless_config, essid) wc + peekCString e else return "" q <- if str >= 0 && rgr >=0 then do qualv <- xqual $ (#ptr struct iw_statistics, qual) stats -- cgit v1.2.3