[OpenSER-Devel] SF.net SVN: openser: [3029] trunk/modules/gflags/gflags.c

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Nov 6 14:14:49 UTC 2007


Hi Henning,

Henning Westerholt wrote:
> On Tuesday 06 November 2007, Bogdan-Andrei Iancu wrote:
>   
>> Hi Henning,
>>
>> I'm not sure if this is correct - according to the documentation:
>>     http://www.openser.org/docs/modules/1.3.x/gflags.html#AEN90
>>
>> the parameter of the MI function is a bitmask and not a flag index. This
>> was changes in order to allow you to operate with multiple flags in the
>> same time.
>>     
>
> Hello Bogdan,
>
> ok, my fault. The documentation for the examples is then misleading or to 
> short. 
I would say short :)
> So how could i set the flag at position 10? 
>   
the parameter of set_flag may be a decimal or hexa (0x....) number 
representing the flag mask.
> $ openserctl set_flag 1024 and 
> $ openserctl set_flag 100000000 don't work either.
>   
you mean  "openserctl fifo set_gflag 1024" does not work? I gave it a 
try and there were no issues.
> And another issue:
>
> openserctl set_flag 1 set the flags to 1:
>   
no, this will set the flags with corresponding to bitmask 1 (index 0).
> $ openserctl fifo get_gflags
> 0x1
> 1
>
> But the check with the fifo command get this
>
> $ openserctl fifo is_gflag 1
> TRUE
> $ openserctl fifo is_gflag 2
> FALSE
> $ openserctl fifo is_gflag 3
> TRUE
> $ openserctl fifo is_gflag 4
> FALSE
> $ openserctl fifo is_gflag 5
> ...
>
> Is this correct?
>   
yes, because the argument is a bitmask and not an index. So, bitmask 1 
and 3 and 5  (and other odd numbers) will check the flag index 1 :)

regards,
bogdan

> Cheers,
>
> Henning
>
>   




More information about the Devel mailing list