diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-01-20 21:14:03 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-01-26 09:09:12 +0100 |
commit | 1d778fdce3bc4aab16dc203463d0067f2f063d16 (patch) | |
tree | fcb4873245ca81e2d214e652d555d7d87741d507 /openbsc/src/gprs/sgsn_vty.c | |
parent | e47d4f6d1187d453b846ea48f95ee75a42efc23b (diff) |
sgsn: Remove the "permanent" subscriber cache
The subscriber cache would help in case:
* GPRS DETACH, GPRS ATTACH. In that case we might still
have some cached authentication tuples we avoid another
sendAuthenticationInfo request.
* After a detach the cache expiry would make sure to
eventually send a purgeMS to the HLR (which might be
ignored).
At the same time to make the cache work we will need to
make sure to start and stop timers. In case we don't
start we might accumulate subscribers. I am afraid that
the above two benefits do not outweight the complexity
of this implementation.
Diffstat (limited to 'openbsc/src/gprs/sgsn_vty.c')
-rw-r--r-- | openbsc/src/gprs/sgsn_vty.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index 18d997b00..b4e1150e6 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -151,10 +151,6 @@ static int config_write_sgsn(struct vty *vty) llist_for_each_entry(acl, &g_cfg->imsi_acl, list) vty_out(vty, " imsi-acl add %s%s", acl->imsi, VTY_NEWLINE); - if (g_cfg->subscriber_expiry_timeout != SGSN_TIMEOUT_NEVER) - vty_out(vty, " subscriber-expiry-timeout %d%s", - g_cfg->subscriber_expiry_timeout, VTY_NEWLINE); - return CMD_SUCCESS; } @@ -406,7 +402,6 @@ static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr, char expire_time[200]; struct gsm_auth_tuple *at; int at_idx; - struct timeval tv; vty_out(vty, " ID: %llu, Authorized: %d%s", subscr->id, subscr->authorized, VTY_NEWLINE); @@ -452,17 +447,6 @@ static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr, vty_out(vty, " Expiration Time: %s%s", expire_time, VTY_NEWLINE); } - /* print the expiration time if the timer is active */ - if (osmo_timer_pending(&subscr->sgsn_data->timer)) { - osmo_timer_remaining(&subscr->sgsn_data->timer, NULL, &tv); - strftime(expire_time, sizeof(expire_time), - "%a, %d %b %Y %T %z", - localtime(&subscr->sgsn_data->timer.timeout.tv_sec)); - expire_time[sizeof(expire_time) - 1] = '\0'; - vty_out(vty, " Expires in: %ds (%s)%s", - (int)tv.tv_sec, expire_time, VTY_NEWLINE); - } - if (subscr->flags) vty_out(vty, " Flags: %s%s%s%s%s%s", subscr->flags & GSM_SUBSCRIBER_FIRST_CONTACT ? @@ -703,25 +687,6 @@ DEFUN(cfg_gsup_remote_port, cfg_gsup_remote_port_cmd, return CMD_SUCCESS; } -DEFUN(cfg_subscriber_expiry_timeout, cfg_subscriber_expiry_timeout_cmd, - "subscriber-expiry-timeout <0-999999>", - "Set the expiry time for unused subscriber entries\n" - "Expiry time in seconds\n") -{ - g_cfg->subscriber_expiry_timeout = atoi(argv[0]); - - return CMD_SUCCESS; -} - -DEFUN(cfg_no_subscriber_expiry_timeout, cfg_no_subscriber_expiry_timeout_cmd, - "no subscriber-expiry-timeout", - NO_STR "Set the expiry time for unused subscriber entries\n") -{ - g_cfg->subscriber_expiry_timeout = atoi(argv[0]); - - return CMD_SUCCESS; -} - int sgsn_vty_init(void) { install_element_ve(&show_sgsn_cmd); @@ -748,8 +713,6 @@ int sgsn_vty_init(void) install_element(SGSN_NODE, &cfg_auth_policy_cmd); install_element(SGSN_NODE, &cfg_gsup_remote_ip_cmd); install_element(SGSN_NODE, &cfg_gsup_remote_port_cmd); - install_element(SGSN_NODE, &cfg_subscriber_expiry_timeout_cmd); - install_element(SGSN_NODE, &cfg_no_subscriber_expiry_timeout_cmd); return 0; } |