Hi Holger,
My point was that. Currently I can do:
1.) accept-all policy... new subscribers will be allowed to register
send/sms/added to the database but their actually authorized=1
As I know, we set authorized=0 for all new subscribers by default
"authorized INTEGER NOT NULL DEFAULT 0, "
2.) I decide to change to closed. All previous subscribers are not
allowed in anymore.
This means I can change policy without updating the database.
Yes, this logic will work after my changes too.
I think
it would be nice for the black-list too.
For black-list you can do:
1. accept-all policy. New subscribers will be allowed to register
send/sms/added to the database with authorized=0
2. Change to black-list. All previous subscribers are not
allowed in anymore. New subscribers will be allowed to register
send/sms/added to the database with authorized=1
So the logic, which I described above, is what I really want to implement.
It is a layering violation. The DB code should know
little about
the gsm_network. It should just save and restore records. We should
assign subscriber->net outside of the code.
I think the problem is that db_create_subscriber() function not only
saves and restores records, but also creates subscriber.
So I believe, that the right way is to add new layer "subscriber" and
separate db_create_subscriber() function in two functions like
create_subscriber() [subscriber layer] and db_set_subscriber() [db
layer].
--
Regards,
Ivan Kluchnikov.
http://fairwaves.ru