summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose A Ortega Ruiz <jao@gnu.org>2010-05-19 14:43:33 +0200
committerJose A Ortega Ruiz <jao@gnu.org>2010-05-19 14:43:33 +0200
commit9a8665f939b26476f0fae452bfdea5c865b75d18 (patch)
treed5a9b945f9a3fb31dac4b71494b31cd9be48fcb4
parent2fd8095794e6249e2c5c0d687aa3253f681cf0ce (diff)
downloadxmobar-9a8665f939b26476f0fae452bfdea5c865b75d18.tar.gz
xmobar-9a8665f939b26476f0fae452bfdea5c865b75d18.tar.bz2
Fix for issue 23 (compat with iwlib 29)
Ignore-this: 8bf9b8b8cd84d4a27dc12cce6ba45121 darcs-hash:20100519124333-748be-a7240313a252438f779e74ff1dcc05a8383b5d9a.gz
-rw-r--r--IWlib.hsc5
1 files changed, 2 insertions, 3 deletions
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