[DGD] bugfix for kotaka: bit by bit

Shentino shentino at gmail.com
Mon Jun 4 17:09:00 CEST 2012


Seems I must now eat crow.

Had an interesting bug in kotaka's logging.  For some reason debug
crap was showing up where it didn't belong.

I had even specified the proper LOG_ERROR | LOG_WARNING bitmask
thingies to the channel config.

Then it hit me...

Those were enumerators, not bits.

So all this time I was doing bitwise operations on enumerators without
first turning them into bitflags with the shift operator.  Which
naturally did nothing but generate garbage when I plugged them into my
logging function.

So remember kids, always remember the difference between flags and enumerators.

:P

Turns out this bug's been in kotaka for quite awhile and I only
recently noticed it.



More information about the DGD mailing list