diff -u wpasupplicant-0.6.9/debian/changelog wpasupplicant-0.6.9/debian/changelog --- wpasupplicant-0.6.9/debian/changelog +++ wpasupplicant-0.6.9/debian/changelog @@ -1,3 +1,11 @@ +wpasupplicant (0.6.9-3ubuntu2) lucid; urgency=low + + * debian/patches/12_no_syslog_flood.patch: + - Upstream GIT change to not flood syslog with CTRL-EVENT-SCAN-RESULTS + messages (LP: #352118) + + -- Chris Coulson Fri, 05 Mar 2010 12:45:09 +0000 + wpasupplicant (0.6.9-3ubuntu1) karmic; urgency=low * Build-depend on libreadline-dev instead of libreadline5-dev. diff -u wpasupplicant-0.6.9/debian/patches/series wpasupplicant-0.6.9/debian/patches/series --- wpasupplicant-0.6.9/debian/patches/series +++ wpasupplicant-0.6.9/debian/patches/series @@ -7,0 +8 @@ +12_no_syslog_flood.patch only in patch2: unchanged: --- wpasupplicant-0.6.9.orig/debian/patches/12_no_syslog_flood.patch +++ wpasupplicant-0.6.9/debian/patches/12_no_syslog_flood.patch @@ -0,0 +1,100 @@ +From: Jouni Malinen +Date: Tue, 10 Nov 2009 13:59:41 +0000 (+0200) +Subject: Add wpa_msg_ctrl() for ctrl_interface-only messages +X-Git-Tag: hostap_0_7_0~85 +X-Git-Url: http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff_plain;h=69856fadf77e680d01cac09da37e6bb3643ca427;hp=c2e3f9df6f4413897c5a16507743b401cd6a7532 + +Add wpa_msg_ctrl() for ctrl_interface-only messages + +This is like wpa_msg(), but the output is directed only to +ctrl_interface listeners. In other words, the output will not be +shown on stdout or in syslog. + +Change scan result reporting to use wpa_msg_ctrl() for +CTRL-EVENT-SCAN-RESULTS message at info level and wpa_printf() at +debug level to avoid showing scan result events in syslog in the +common configuration used with NetworkManager. +--- + +Index: wpasupplicant-0.6.9/src/utils/wpa_debug.c +=================================================================== +--- wpasupplicant-0.6.9.orig/src/utils/wpa_debug.c 2010-03-05 12:55:24.023215355 +0000 ++++ wpasupplicant-0.6.9/src/utils/wpa_debug.c 2010-03-05 12:55:24.053195283 +0000 +@@ -335,6 +335,30 @@ + wpa_msg_cb(ctx, level, buf, len); + os_free(buf); + } ++ ++ ++void wpa_msg_ctrl(void *ctx, int level, char *fmt, ...) ++{ ++ va_list ap; ++ char *buf; ++ const int buflen = 2048; ++ int len; ++ ++ if (!wpa_msg_cb) ++ return; ++ ++ buf = os_malloc(buflen); ++ if (buf == NULL) { ++ wpa_printf(MSG_ERROR, "wpa_msg_ctrl: Failed to allocate " ++ "message buffer"); ++ return; ++ } ++ va_start(ap, fmt); ++ len = vsnprintf(buf, buflen, fmt, ap); ++ va_end(ap); ++ wpa_msg_cb(ctx, level, buf, len); ++ os_free(buf); ++} + #endif /* CONFIG_NO_WPA_MSG */ + + +Index: wpasupplicant-0.6.9/src/utils/wpa_debug.h +=================================================================== +--- wpasupplicant-0.6.9.orig/src/utils/wpa_debug.h 2010-03-05 12:55:24.023215355 +0000 ++++ wpasupplicant-0.6.9/src/utils/wpa_debug.h 2010-03-05 12:55:24.053195283 +0000 +@@ -141,6 +141,7 @@ + + #ifdef CONFIG_NO_WPA_MSG + #define wpa_msg(args...) do { } while (0) ++#define wpa_msg_ctrl(args...) do { } while (0) + #define wpa_msg_register_cb(f) do { } while (0) + #else /* CONFIG_NO_WPA_MSG */ + /** +@@ -159,6 +160,20 @@ + */ + void wpa_msg(void *ctx, int level, char *fmt, ...) PRINTF_FORMAT(3, 4); + ++/** ++ * wpa_msg_ctrl - Conditional printf for ctrl_iface monitors ++ * @ctx: Pointer to context data; this is the ctx variable registered ++ * with struct wpa_driver_ops::init() ++ * @level: priority level (MSG_*) of the message ++ * @fmt: printf format string, followed by optional arguments ++ * ++ * This function is used to print conditional debugging and error messages. ++ * This function is like wpa_msg(), but it sends the output only to the ++ * attached ctrl_iface monitors. In other words, it can be used for frequent ++ * events that do not need to be sent to syslog. ++ */ ++void wpa_msg_ctrl(void *ctx, int level, char *fmt, ...) PRINTF_FORMAT(3, 4); ++ + typedef void (*wpa_msg_cb_func)(void *ctx, int level, const char *txt, + size_t len); + +Index: wpasupplicant-0.6.9/wpa_supplicant/events.c +=================================================================== +--- wpasupplicant-0.6.9.orig/wpa_supplicant/events.c 2010-03-05 12:55:29.530701711 +0000 ++++ wpasupplicant-0.6.9/wpa_supplicant/events.c 2010-03-05 12:55:44.540704728 +0000 +@@ -631,7 +631,8 @@ + wpa_msg(wpa_s, MSG_DEBUG, "Cached scan results are " + "empty - not posting"); + } else { +- wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS); ++ wpa_printf(MSG_DEBUG, "New scan results available"); ++ wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS); + wpa_supplicant_dbus_notify_scan_results(wpa_s); + wpas_wps_notify_scan_results(wpa_s); + }