Hi Neels, On Tue, Mar 15, 2016 at 01:28:10PM +0100, Neels Hofmeyr wrote: > So create new functions to take on the MCC+MNC BCD handling and call those > from gsm48_generate_lai() and gsm48_decode_lai(). In this way, the 3G code > in openbsc can use only the BCD functionality without code duplication.
fine. As this kind of bit/nibble shifting is something that can easily get wrong, and we don't have a test case yet, it should be best to add a test case testing gsm48_generate_lai() first, then perform the factoring-out and confirm that the test result doesn't change. -- - Harald Welte <[email protected]> http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6)
