Logging bug in today's SVN 20080403

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 3, 2008 at 3:28 PM, Michael CHRISTOPHER <pjsip at encambio.com> wrote:
>
>  Hello,
>
[snip]
>  An kludgy alternative is to always test for a positive value in
>  PJ_LOG_MAX_LEVEL before using logging symbols, something like:
>
>  #if PJ_LOG_MAX_LEVEL >= 1
>     va_start(args, format);
>     pj_log("libsrtp", priority, format, args);
>     va_end(args);
>  #endif
>
>  ...in srtp_err.c for example.

Actually this is my preferred solution. The convention in PJLIB is any
code should not call pj_log() function directly but rather PJ_LOG
macro which would sort out the expansion based on the configured
level. And if a code does call pj_log() function directly, it must
protect it with the #if above. So far everything follows this
convention, apart from the srtp_err.c above of course.

I've just fixed this in the latest SVN. Thanks for the report!

Cheers
 Benny



>  Otherwise one may never use the logging symbols, without making
>  the risky assumption that they indeed exist in a library.
>
>  Regards,
>  Michael
>
>  _______________________________________________
>  Visit our blog: http://blog.pjsip.org
>
>  pjsip mailing list
>  pjsip at lists.pjsip.org
>  http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux