This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.
Ivan Kluchnikov Ivan.Kluchnikov at fairwaves.ruHi Holger, 2013/9/18 Holger Hans Peter Freyther <holger at freyther.de>: > this causes a segfault in the tests (as there is no network that > we pass). E.g. make check is failing. Yes, I missed "make check", I will fix db test to support our case. > On second thought I wonder about the semantic of this patch. E.g. > if I run an accept-all network.. and then switch to a closed > policy. The authorized field will still be 0. But with this change > I can not easily change. For auth policy clarification: accept-all = accept MS with authorized = 1 and 0, for all new subscribers set authorized = 0 closed = accept MS with authorized = 1, MS with authorized = 0 and all new subscribers should be rejected black-list = accept MS with authorized = 1, MS with authorized = 0 should be rejected, for all new subscribers set authorized = 1 You can see, that "black-list" is like "closed", but in black-list mode we set authorized = 1 for all new subscribers. So the idea was to save meaning of authorized parameter, accept with authorized = 1 and reject with authorized = 0. > > Have you considered using an enum like > > enum { > AUTHORIZED_NOTSET, > AUTHORIZED_ALLOWED, > AUTHORIZES_BLACKLISTED, > }; > > >> + return subscriber->authorized; > > return subscriber->authorized != AUTHORIZES_BLACKLISTED? > > doesn't look too bad and one avoids the using net inside the db > code. What's the problem to use net inside the db code? Moreover, net is used in db_create_subscriber() function. -- Regards, Ivan Kluchnikov. http://fairwaves.ru