#20623: hostapd: no logging of wpa_printf messages
----------------------+------------------------
 Reporter:  rmilecki  |      Owner:  developers
     Type:  defect    |     Status:  new
 Priority:  normal    |  Milestone:
Component:  packages  |    Version:  Trunk
 Keywords:            |
----------------------+------------------------
 hostapd internally uses few functions for logging, e.g.:
 1. hostapd_logger
 2. wpa_printf
 ----
 The first one works perfectly fine in OpenWrt. Whenever there is:
 {{{
 hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_INFO,
 "Foo\n");
 }}}
 it works OK, a following line appears in syslog:
 {{{
 daemon.info hostapd: wlan0: IEEE 802.11 Foo
 }}}
 Above works because `hostapd_logger` (wpa_debug.c) calls
 `hostapd_logger_cb` (wpa_debug.c) which points to the `hostapd_logger_cb`
 (main.c). That last function calls `syslog(priority, "%s", format);`.
 ----
 Unfortunately logging messages printed by hostapd with `wpa_printf`
 doesn't work at all. Whenever something like:
 {{{
 wpa_printf(MSG_ERROR, "Foo\n");
 }}}
 is executed, nothing appears in a syslog. In current implementation &
 config `_wpa_printf` calls `vprintf(fmt, ap);` which doesn't result in
 message appearing in a syslog.

--
Ticket URL: <https://dev.openwrt.org/ticket/20623>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to