diff options
Diffstat (limited to 'openbsc/src/libmsc/vty_interface_layer3.c')
-rw-r--r-- | openbsc/src/libmsc/vty_interface_layer3.c | 92 |
1 files changed, 16 insertions, 76 deletions
diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4c2088a0f..fdc7e8e6f 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -53,8 +53,6 @@ #include "meas_feed.h" -extern struct gsm_network *gsmnet_from_vty(struct vty *v); - static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr) { int rc; @@ -139,7 +137,7 @@ DEFUN(show_subscr_cache, DEFUN(sms_send_pend, sms_send_pend_cmd, "sms send pending", - "SMS related comamnds\n" "SMS Sending related commands\n" + "SMS related commands\n" "SMS Sending related commands\n" "Send all pending SMS") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); @@ -174,6 +172,7 @@ static int _send_sms_str(struct gsm_subscriber *receiver, sms_free(sms); return CMD_WARNING; } + LOGP(DLSMS, LOGL_DEBUG, "SMS stored in DB\n"); sms_free(sms); sms_queue_trigger(receiver->group->net->sms_queue); @@ -197,10 +196,10 @@ static struct gsm_subscriber *get_subscr_by_argv(struct gsm_network *gsmnet, } #define SUBSCR_TYPES "(extension|imsi|tmsi|id)" #define SUBSCR_HELP "Operations on a Subscriber\n" \ - "Identify subscriber by his extension (phone number)\n" \ - "Identify subscriber by his IMSI\n" \ - "Identify subscriber by his TMSI\n" \ - "Identify subscriber by his database ID\n" \ + "Identify subscriber by extension (phone number)\n" \ + "Identify subscriber by IMSI\n" \ + "Identify subscriber by TMSI\n" \ + "Identify subscriber by database ID\n" \ "Identifier for the subscriber\n" DEFUN(show_subscr, @@ -611,6 +610,7 @@ DEFUN(ena_subscr_handover, SUBSCR_HELP "Handover the active connection\n" "Number of the BTS to handover to\n") { +#if BEFORE_MSCSPLIT int ret; struct gsm_subscriber_connection *conn; struct gsm_bts *bts; @@ -654,6 +654,10 @@ DEFUN(ena_subscr_handover, subscr_put(subscr); return CMD_SUCCESS; +#else + vty_out(vty, "%% Not implemented!%s", VTY_NEWLINE); + return -1; +#endif } #define A3A8_ALG_TYPES "(none|xor|comp128v1)" @@ -768,6 +772,7 @@ DEFUN(subscriber_update, static int scall_cbfn(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) { +#if BEFORE_MSCSPLIT struct scall_signal_data *sigdata = signal_data; struct vty *vty = sigdata->data; @@ -782,6 +787,10 @@ static int scall_cbfn(unsigned int subsys, unsigned int signal, break; } return 0; +#else + /* not implemented yet! */ + return -1; +#endif } DEFUN(show_stats, @@ -791,7 +800,6 @@ DEFUN(show_stats, { struct gsm_network *net = gsmnet_from_vty(vty); - openbsc_vty_print_statistics(vty, net); vty_out(vty, "Location Update : %lu attach, %lu normal, %lu periodic%s", osmo_counter_get(net->stats.loc_upd_type.attach), osmo_counter_get(net->stats.loc_upd_type.normal), @@ -1018,66 +1026,6 @@ DEFUN(logging_fltr_imsi, return CMD_SUCCESS; } -static struct cmd_node nitb_node = { - NITB_NODE, - "%s(config-nitb)# ", - 1, -}; - -DEFUN(cfg_nitb, cfg_nitb_cmd, - "nitb", "Configure NITB options") -{ - vty->node = NITB_NODE; - return CMD_SUCCESS; -} - -DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, - "subscriber-create-on-demand", - "Make a new record when a subscriber is first seen.\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 1; - return CMD_SUCCESS; -} - -DEFUN(cfg_nitb_no_subscr_create, cfg_nitb_no_subscr_create_cmd, - "no subscriber-create-on-demand", - NO_STR "Make a new record when a subscriber is first seen.\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 0; - return CMD_SUCCESS; -} - -DEFUN(cfg_nitb_assign_tmsi, cfg_nitb_assign_tmsi_cmd, - "assign-tmsi", - "Assign TMSI during Location Updating.\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->avoid_tmsi = 0; - return CMD_SUCCESS; -} - -DEFUN(cfg_nitb_no_assign_tmsi, cfg_nitb_no_assign_tmsi_cmd, - "no assign-tmsi", - NO_STR "Assign TMSI during Location Updating.\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->avoid_tmsi = 1; - return CMD_SUCCESS; -} - -static int config_write_nitb(struct vty *vty) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - vty_out(vty, "nitb%s", VTY_NEWLINE); - vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE); - vty_out(vty, " %sassign-tmsi%s", - gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); - return CMD_SUCCESS; -} - int bsc_vty_init_extra(void) { osmo_signal_register_handler(SS_SCALL, scall_cbfn, NULL); @@ -1123,13 +1071,5 @@ int bsc_vty_init_extra(void) install_element(CFG_LOG_NODE, &log_level_sms_cmd); install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); - - install_element(CONFIG_NODE, &cfg_nitb_cmd); - install_node(&nitb_node, config_write_nitb); - install_element(NITB_NODE, &cfg_nitb_subscr_create_cmd); - install_element(NITB_NODE, &cfg_nitb_no_subscr_create_cmd); - install_element(NITB_NODE, &cfg_nitb_assign_tmsi_cmd); - install_element(NITB_NODE, &cfg_nitb_no_assign_tmsi_cmd); - return 0; } |