Re: [MM 0.6] Plumb up the SPN display-rule bits



Hey Nathan,

On 03/01/2012 02:28 PM, Aleksander Morgado wrote:
>> -        /* First byte is metadata; remainder is GSM-7 unpacked into octets; convert to UTF8 */
>> > +        /* Bits in the first byte specify rules for name display */
>> > +        if (bin[0] == '\xFF' && bin[1] == '\xFF') {
>> > +            /* If we got all-FF, don't enable display */
>> > +            *display_reg_home = FALSE;
>> > +            *display_op_roaming = FALSE;
>> > +        } else {
>> > +            *display_reg_home = ((bin[0] & 1) == 1);
>> > +            *display_op_roaming = ((bin[0] & 2) == 2);
> You sure this is not the inverse? The documentation says that "b2=0"
> means "required" and "b1=0" means "not required".
> 
> 

I still think that reading the b2 bit should be fixed here; b2=0 means
to "require" to show the SPN while roaming in a network !home and !spdi; so:
    *display_op_roaming = !(bin[0] & 2);

-- 
Aleksander


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]