openbsc[master]: add struct bsc_sub, separating libbsc from gsm_subscriber

Neels Hofmeyr gerrit-no-reply at
Wed Feb 1 03:10:59 UTC 2017

Patch Set 4:


I'm trying to factor this out from the VLR branch to start submitting while still focusing mostly on the VLR branch HEAD; in effect, this is still immature. Thanks for reviewing to pinpoint those immaturities.
File openbsc/src/libbsc/bsc_subscriber.c:

Line 113: 	else
in case of TMSI == GSM_RESERVED_TMSI, could print "unknown" instead, here.
File openbsc/src/libbsc/bsc_vty.c:

Line 1024: 	vty_out(vty, "    Use count: %d%s", bsub->use_count, VTY_NEWLINE);
> ->name has some overlap.. shall we have tmsi != GSM_RESERVED_TMSI.. in the 
in principle yes, but what else can we print if neither IMSI nor TMSI are available? I think my decision was to then print GSM_RESERVED_TMSI... could also print "(unknown)" instead.
File openbsc/src/libbsc/paging.c:

Line 80
> no replacement for this?
I'm trying to push this away, see also

Your opinion on #1685 would be much appreciated...
I dimly remember that you said the IMSI filter didn't work so well anyway. True?
File openbsc/src/libcommon-cs/common_cs.c:

Line 73: 	net->bsc_subscribers = talloc_zero(net, struct llist_head);
> only done to have a talloc context?
for talloc yes, also thinking of a case in the OsmoCSCN where there are no bsc_subscribers ... so then the llist would be NULL altogether to indicate absence of libbsc. (hmm, did I add the null checks for that?)
File openbsc/src/libmsc/gsm_subscriber.c:

Line 97: 	bsub = bsc_sub_have_by_imsi(conn->network->bsc_subscribers, subscr->imsi);
(no bsc_subscribers NULL check here, or anywhere, really)

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e
Gerrit-PatchSet: 4
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at>
Gerrit-Reviewer: Holger Freyther <holger at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at>
Gerrit-HasComments: Yes

More information about the gerrit-log mailing list