mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-05 02:34:18 +00:00
85e2eaaf58
"x >> 1" is _NOT_ the reverse of "1 << x"... Use code from Sean Eron Andersen's "Bit Twiddling Hacks" (=> http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog) to compute the log2 value (= position in the enum) of the bitflag. This preserves the current behaviour, which is rather odd because it is based on the position of the value in the enum, not its actual (bit flag) value. Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
FreeTDM http://wiki.freeswitch.org/wiki/FreeTDM