Hi all

this wpa_debug_level is again re-initialized in
wpa_supplicant.c(wpa_supplicant_init) to -1. so always debug messages
are coming.

wpa_debug_level = global->params.wpa_debug_level = params-
>wpa_debug_level;

Please let me know what I need to avoid this one?

Thanks
Gururaja b O



On Jun 11, 7:29 pm, guru <[email protected]> wrote:
> Sorry Manav, it was typing mistake. is is wpa_debug_level only.
>
> On Jun 11, 7:21 pm, Manav Gautama <[email protected]> wrote:
>
> > On Fri, Jun 11, 2010 at 7:35 PM, guru <[email protected]> wrote:
> > > HI all
>
> > > in many of the wpa_supplicant code they are using ENTER and LEAVE
> > > macros to display the logs(Below). At last it will call
> > > android_printf.
>
> > > I want to make sure that only message with MSG_WARNING should be
> > > displayed. so what I did is I assigned
>
> > > wpa_debug_leve = MSG_WARNING so since
>
> > Shouldn't this be wpa_debug_level Guru ?
>
> > > MSG_DEBUG value is < than  MSG_WARNING, so it wont display.
>
> > > #define ENTER() wpa_printf(MSG_DEBUG, "WPA_SUPP: enter into %s",
> > > __FUNCTION__)
> > > #define LEAVE() wpa_printf(MSG_DEBUG, "WPA_SUPP: leave from %s",
> > > __FUNCTION__)
>
> > > define wpa_printf(level, ...) \
> > >        do {                                            \
> > >            android_printf((level), __VA_ARGS__); \
> > >        } while (0)
>
> > > void android_printf(int level, char *format, ...)
> > > {
> > >        if (level >= wpa_debug_level) {
> > >                va_list ap;
> > >                if (level == MSG_ERROR) {
> > >                        level = ANDROID_LOG_ERROR;
> > >                } else if (level == MSG_WARNING) {
> > >                        level = ANDROID_LOG_WARN;
> > >                } else if (level == MSG_INFO) {
> > >                        level = ANDROID_LOG_INFO;
> > >                } else {
> > >                        level = ANDROID_LOG_DEBUG;
> > >                }
> > >                va_start(ap, format);
> > >                __android_log_vprint(level, "wpa_supplicant", format,
> > > ap);
> > >                va_end(ap);
> > >        }
> > > }
>
> > > But still it is displaying the logs with MSG_DEBUG level. please let
> > > me know where I am going wrong. How to disable these logs?
>
> > > Thanks
> > > Gururaja B O
>
> > > --
> > > unsubscribe: 
> > > [email protected]<android-porting%[email protected]>
> > > website:http://groups.google.com/group/android-porting

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to