mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
osmo-grace: Introduce a global trace text to be send to subscribers
This commit is contained in:
@@ -698,6 +698,7 @@ struct gsm_network {
|
||||
int ping_timeout;
|
||||
int pong_timeout;
|
||||
struct bsc_msc_rf *rf;
|
||||
char *ussd_grace_txt;
|
||||
};
|
||||
|
||||
#define SMS_HDR_SIZE 128
|
||||
|
@@ -528,6 +528,9 @@ static int config_write_net(struct vty *vty)
|
||||
vty_out(vty, " msc ip-dscp %d%s", gsmnet->msc_ip_dscp, VTY_NEWLINE);
|
||||
vty_out(vty, " timeout ping %d%s", gsmnet->ping_timeout, VTY_NEWLINE);
|
||||
vty_out(vty, " timeout pong %d%s", gsmnet->pong_timeout, VTY_NEWLINE);
|
||||
if (gsmnet->ussd_grace_txt)
|
||||
vty_out(vty, " bsc-grace-text %s%s", gsmnet->ussd_grace_txt, VTY_NEWLINE);
|
||||
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
@@ -1443,6 +1446,22 @@ DEFUN(cfg_net_pong_time,
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(cfg_net_grace_ussd,
|
||||
cfg_net_grace_ussd_cmd,
|
||||
"bsc-grace-text .TEXT",
|
||||
"Set the USSD notifcation to be send.\n" "Text to be sent\n")
|
||||
{
|
||||
char *data = argv_concat(argv, argc, 1);
|
||||
if (!data)
|
||||
return CMD_WARNING;
|
||||
|
||||
if (gsmnet->ussd_grace_txt)
|
||||
talloc_free(gsmnet->ussd_grace_txt);
|
||||
gsmnet->ussd_grace_txt = talloc_strdup(gsmnet, data);
|
||||
talloc_free(data);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
#define DECLARE_TIMER(number, doc) \
|
||||
DEFUN(cfg_net_T##number, \
|
||||
cfg_net_T##number##_cmd, \
|
||||
@@ -2265,6 +2284,7 @@ int bsc_vty_init(struct gsm_network *net)
|
||||
install_element(GSMNET_NODE, &cfg_net_msc_prio_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_ping_time_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_pong_time_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_grace_ussd_cmd);
|
||||
|
||||
install_element(GSMNET_NODE, &cfg_bts_cmd);
|
||||
install_node(&bts_node, config_write_bts);
|
||||
|
Reference in New Issue
Block a user