core/logging: Fix broken syslog levels on older glibc.
authorWalter Doekes <walter+asterisk@wjd.nu>
Thu, 24 Mar 2016 10:48:32 +0000 (11:48 +0100)
committerJoshua Colp <jcolp@digium.com>
Thu, 24 Mar 2016 11:34:47 +0000 (06:34 -0500)
commit87c9ab97ea8038b3ef694d027bce26f29ea24777
tree5581845c9a8ad1d7a70180c3cf7d6667bd3bc3f3
parentd7ee89b49950522f78afaca70d194f868f59321c
core/logging: Fix broken syslog levels on older glibc.

The fix to ASTERISK-25407 introduced the usage of LOG_MAKEPRI. However
this macro is broken in older glibc (< 2.17); it would left-shift the
facility a second time, causing the resultant priority to become
invalid.

The syslog manpage mentions nothing about LOG_MAKEPRI and suggests this:

    The priority argument is formed by ORing the facility and the level
    values [...].

ASTERISK-25510 #close
Reported by: Michael Newton

Change-Id: Ia89debe7fac5ad090c7ef595c0707f31bb1e3d03
main/logger.c