This fixes a warning that occurs when turning off hostapd.
Signed-off-by: Johannes Berg <[email protected]>
---
Thought I'd send that earlier but it seems I forgot.
This is a slightly modified version of my original patch, please do test
it as I've not been able to test it right now. The original was fine
though, but it shut down the eloop in wireless_event_deinit instead of
here.
--- hostap.orig/hostapd/driver_devicescape.c 2007-08-15 13:06:48.000000000 +0200
+++ hostap/hostapd/driver_devicescape.c 2007-08-15 13:07:39.000000000 +0200
@@ -1954,8 +1954,10 @@ static void i802_deinit(void *priv)
(void) hostapd_set_iface_flags(drv, 0);
- if (drv->sock >= 0)
+ if (drv->sock >= 0) {
+ eloop_unregister_read_sock(drv->sock);
close(drv->sock);
+ }
if (drv->ioctl_sock >= 0)
close(drv->ioctl_sock);
On Wed, 2007-08-15 at 18:46 -0700, Jouni Malinen wrote:
> I cannot currently even compile driver_devicescape.c successfully never
> mind test it ;-),
Hm? I can compile it fine against the current wireless-dev tree
'everything' branch.
johannes
On Wed, Aug 15, 2007 at 01:08:51PM +0200, Johannes Berg wrote:
> This fixes a warning that occurs when turning off hostapd.
Thanks, applied.
> This is a slightly modified version of my original patch, please do test
> it as I've not been able to test it right now. The original was fine
> though, but it shut down the eloop in wireless_event_deinit instead of
> here.
I cannot currently even compile driver_devicescape.c successfully never
mind test it ;-), but anyway, this is in the category of obviously
correct fixes, so I have no problems including this without testing.
eloop_unregister_read_sock() did not exist when the code was originally
written and it just started showing up as a warning when I added
debugging code for reporting forgotten eloop entries at program
termination.
--
Jouni Malinen PGP id EFC895FA