Patch Set 1: Code-Review-1
(4 comments)
https://gerrit.osmocom.org/#/c/104/1/openbsc/src/libbsc/bsc_vty.c File openbsc/src/libbsc/bsc_vty.c:
Line 1411: "Use regular expression for IMSI authorization decision\n" tabs vs. spaces. Yes the rest is inconsistent but please use tabs here.
https://gerrit.osmocom.org/#/c/104/1/openbsc/src/libbsc/net_init.c File openbsc/src/libbsc/net_init.c:
Line 52: net->authorized_reg_str = NULL; you can omit it. We rely on talloc_zero for many of these things. You don't need to omit it though.
https://gerrit.osmocom.org/#/c/104/1/openbsc/src/libmsc/gsm_04_08.c File openbsc/src/libmsc/gsm_04_08.c:
Line 255: if (regexec(&net->authorized_regexp, imsi, 0, NULL, 0) != REG_NOMATCH) just return it?
Line 538: return subscr_create_subscriber(net->subscr_group, imsi); Do you want to have authorized = 1; here as well or rely on the regexp being called every time?