The gflags module is not returning the expected results with is_gflag
() using the version of Openser we have installed now.  If I set a 
gflag, for instance 3, when I read back the flags that are set 
multiple flags are showing up.  Using the example 3, anything that 
sets bit one or bit two is returned as being true.

For Example:
gflag 1 is TRUE
gflag 2 is TRUE
gflag 3 is TRUE
gflag 4 is FALSE
gflag 5 is TRUE
gflag 6 is TRUE
gflag 7 is TRUE
gflag 8 is FALSE

The problem appears to be the logic being used in is_gflag().

   return ( (*gflags) & ((unsigned int)(long)flag)) ? 1 : -1;

There appear to be other problems in this module in the set flag 
routine as well.  The documentation states that the argument passed 
in is the bit position you want set in a 32 bit bitmask.  However, it 
appears that the code is OR'ing what you pass in with whatever is 
already there.  Not exactly the same thing at all.

It looks like the only way to use these in the current state of the 
code would be to use the get flags routine and AND that against 
whatever I am looking for.  Checking individual flags will certainly 
not work.

Richard
--


T.R. Missner

VP Network Engineering
[EMAIL PROTECTED]
4001 Weston Parkway
Cary, NC 27513
919-439-3575
919-297-1101 - Fax

_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to