Hello

 

Can somebody help me understand the example given with MI command "is_gflag"? 

 

 

...
$ kamctl fifo set_gflag 1024
$ kamctl fifo is_gflag 1024
TRUE
$ kamctl fifo is_gflag 1025
TRUE
$ kamctl fifo is_gflag 1023
FALSE
$ kamctl fifo set_gflag 0x10
$ kamctl fifo is_gflag 1023
TRUE
$ kamctl fifo is_gflag 1007
FALSE
$ kamctl fifo is_gflag 16
TRUE


This is how I understand it. There are 32 posible flags (0..31), each one can 
be set independently. The commands "is_flag" and "set_gflag" expect a bitmask 
as value (decimal or hex)

 

If I set "kamctl fifo set_gflag 1024", this means "100 0000 0000", I expect 
that the only flag that has been set to 1 is the position 10. How come the 
command "kamctl fifo is_gflag 1025" which is "100 0000 0001" can yield TRUE?. I 
expect it to be TRUE only if flags 0 and 10 are both set to 1.

 

Same thing with setting the flag to 0x10 (16 in decimal, "1 0000" in binary), 
how come the "is_gflag 1023 and is_gflag 1007" can return TRUE?

 

tx a lot 

fborot

 

 





                                          
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to