diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-12-28 18:54:32 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-01-02 11:43:06 +0100 |
commit | 6995f24831b70ef64bd08976f2aecc5314fe9862 (patch) | |
tree | 2d8465b045245304156394930a4ff60ad9d6cf04 /openbsc/src/libbsc | |
parent | b7ccac4d620271e8780fdc7640cba96c275bdf85 (diff) |
logging: Only compare the subscr address
Move the "logging filter imsi IMSI" into the BTS/NITB code to
allow to set the gsm_subscriber and only compare it. This way
we simply compare the subscriber address and don't have to care
if the subscriber data is still valid.
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r-- | openbsc/src/libbsc/bsc_vty.c | 18 | ||||
-rw-r--r-- | openbsc/src/libbsc/paging.c | 5 |
2 files changed, 1 insertions, 22 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 3e7ac585e..2857494eb 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -3183,22 +3183,6 @@ void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net) osmo_counter_get(net->stats.bts.rsl_fail), VTY_NEWLINE); } -DEFUN(logging_fltr_imsi, - logging_fltr_imsi_cmd, - "logging filter imsi IMSI", - LOGGING_STR FILTER_STR - "Filter log messages by IMSI\n" "IMSI to be used as filter\n") -{ - struct log_target *tgt = osmo_log_vty2tgt(vty); - - if (!tgt) - return CMD_WARNING; - - log_set_imsi_filter(tgt, argv[0]); - return CMD_SUCCESS; -} - - DEFUN(drop_bts, drop_bts_cmd, "drop bts connection <0-65535> (oml|rsl)", @@ -3383,13 +3367,11 @@ int bsc_vty_init(const struct log_info *cat) install_element_ve(&show_ts_cmd); install_element_ve(&show_lchan_cmd); install_element_ve(&show_lchan_summary_cmd); - install_element_ve(&logging_fltr_imsi_cmd); install_element_ve(&show_paging_cmd); install_element_ve(&show_paging_group_cmd); logging_vty_add_cmds(cat); - install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); install_element(CONFIG_NODE, &cfg_net_cmd); install_node(&net_node, config_write_net); diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c index 18bb3fe09..2d08af78a 100644 --- a/openbsc/src/libbsc/paging.c +++ b/openbsc/src/libbsc/paging.c @@ -250,12 +250,11 @@ static int paging_pending_request(struct gsm_bts_paging_state *bts, static void paging_T3113_expired(void *data) { struct gsm_paging_request *req = (struct gsm_paging_request *)data; - struct gsm_subscriber *subscr = subscr_get(req->subscr); void *cbfn_param; gsm_cbfn *cbfn; int msg; - log_set_context(BSC_CTX_SUBSCR, subscr); + log_set_context(BSC_CTX_SUBSCR, req->subscr); LOGP(DPAG, LOGL_INFO, "T3113 expired for request %p (%s)\n", req, req->subscr->imsi); @@ -275,8 +274,6 @@ static void paging_T3113_expired(void *data) cbfn(GSM_HOOK_RR_PAGING, msg, NULL, NULL, cbfn_param); - log_set_context(BSC_CTX_SUBSCR, NULL); - subscr_put(subscr); } static int _paging_request(struct gsm_bts *bts, struct gsm_subscriber *subscr, |