diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-05-29 13:54:27 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-06-09 08:49:36 +0000 |
commit | 4a824ca8fcf13427d1560b2c866da2a2d82e3692 (patch) | |
tree | 9b85a739ddca384e56959a9bdfe0586d8e987148 /openbsc/src/osmo-bsc_nat | |
parent | aef68387ae6d78df948a6b2b3a61050c4f192c5e (diff) |
don't re-implement osmo_talloc_replace_string()
osmo_talloc_replace_string() was introducd into libosmocore in 2014, see
commit f3c7e85d05f7b2b7bf093162b776f71b2bc6420d
There's no reason for us to re-implement this as bsc_replace_string
here.
Change-Id: I6d2fcaabbc74730f6f491a2b2d5c784ccafc6602
Diffstat (limited to 'openbsc/src/osmo-bsc_nat')
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c | 2 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat_utils.c | 2 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat_vty.c | 28 |
3 files changed, 16 insertions, 16 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c index 345375897..128ea6518 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c @@ -362,7 +362,7 @@ static int set_net_cfg_cmd(struct ctrl_cmd *cmd, void *data) return CTRL_CMD_ERROR; if (strcmp(bsc_variable, "access-list-name") == 0) { - bsc_replace_string(bsc_cfg, &bsc_cfg->acc_lst_name, cmd->value); + osmo_talloc_replace_string(bsc_cfg, &bsc_cfg->acc_lst_name, cmd->value); cmd->reply = talloc_asprintf(cmd, "%s", bsc_cfg->acc_lst_name ? bsc_cfg->acc_lst_name : ""); return CTRL_CMD_REPLY; diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c index bb0f4c4a6..c12b29f1f 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c @@ -139,7 +139,7 @@ void bsc_nat_free(struct bsc_nat *nat) void bsc_nat_set_msc_ip(struct bsc_nat *nat, const char *ip) { - bsc_replace_string(nat, &nat->main_dest->ip, ip); + osmo_talloc_replace_string(nat, &nat->main_dest->ip, ip); } struct bsc_connection *bsc_connection_alloc(struct bsc_nat *nat) diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c index deb98fcd6..a11ae151e 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c @@ -479,7 +479,7 @@ DEFUN(cfg_nat_token, cfg_nat_token_cmd, "Authentication token configuration\n" "Token of the BSC, currently transferred in cleartext\n") { - bsc_replace_string(_nat, &_nat->token, argv[0]); + osmo_talloc_replace_string(_nat, &_nat->token, argv[0]); return CMD_SUCCESS; } @@ -502,7 +502,7 @@ DEFUN(cfg_nat_acc_lst_name, "Set the name of the access list to use.\n" "The name of the to be used access list.") { - bsc_replace_string(_nat, &_nat->acc_lst_name, argv[0]); + osmo_talloc_replace_string(_nat, &_nat->acc_lst_name, argv[0]); return CMD_SUCCESS; } @@ -518,11 +518,11 @@ DEFUN(cfg_nat_include, struct bsc_connection *con1, *con2; if ('/' == argv[0][0]) - bsc_replace_string(_nat, &_nat->resolved_path, argv[0]); + osmo_talloc_replace_string(_nat, &_nat->resolved_path, argv[0]); else { path = talloc_asprintf(_nat, "%s/%s", _nat->include_base, argv[0]); - bsc_replace_string(_nat, &_nat->resolved_path, path); + osmo_talloc_replace_string(_nat, &_nat->resolved_path, path); talloc_free(path); } @@ -538,7 +538,7 @@ DEFUN(cfg_nat_include, return CMD_WARNING; } - bsc_replace_string(_nat, &_nat->include_file, argv[0]); + osmo_talloc_replace_string(_nat, &_nat->include_file, argv[0]); llist_for_each_entry_safe(con1, con2, &_nat->bsc_connections, list_entry) { @@ -574,7 +574,7 @@ DEFUN(cfg_nat_imsi_black_list_fn, "IMSI black listing\n" "Filename IMSI and reject-cause\n") { - bsc_replace_string(_nat, &_nat->imsi_black_list_fn, argv[0]); + osmo_talloc_replace_string(_nat, &_nat->imsi_black_list_fn, argv[0]); if (_nat->imsi_black_list_fn) { int rc; struct osmo_config_list *rewr = NULL; @@ -609,7 +609,7 @@ static int replace_rules(struct bsc_nat *nat, char **name, { struct osmo_config_list *rewr = NULL; - bsc_replace_string(nat, name, file); + osmo_talloc_replace_string(nat, name, file); if (*name) { rewr = osmo_config_list_parse(nat, *name); bsc_nat_num_rewr_entry_adapt(nat, head, rewr); @@ -740,7 +740,7 @@ DEFUN(cfg_nat_prefix_trie, _nat->num_rewr_trie = NULL; /* replace the file name */ - bsc_replace_string(_nat, &_nat->num_rewr_trie_name, argv[0]); + osmo_talloc_replace_string(_nat, &_nat->num_rewr_trie_name, argv[0]); if (!_nat->num_rewr_trie_name) { vty_out(vty, "%% prefix-tree no filename is present.%s", VTY_NEWLINE); return CMD_WARNING; @@ -789,7 +789,7 @@ DEFUN(cfg_nat_ussd_lst_name, "Set the name of the access list to check for IMSIs for USSD message\n" "The name of the access list for HLR USSD handling") { - bsc_replace_string(_nat, &_nat->ussd_lst_name, argv[0]); + osmo_talloc_replace_string(_nat, &_nat->ussd_lst_name, argv[0]); return CMD_SUCCESS; } @@ -809,7 +809,7 @@ DEFUN(cfg_nat_ussd_token, "ussd-token TOKEN", "Set the token used to identify the USSD module\n" "Secret key\n") { - bsc_replace_string(_nat, &_nat->ussd_token, argv[0]); + osmo_talloc_replace_string(_nat, &_nat->ussd_token, argv[0]); return CMD_SUCCESS; } @@ -818,7 +818,7 @@ DEFUN(cfg_nat_ussd_local, "ussd-local-ip A.B.C.D", "Set the IP to listen for the USSD Provider\n" "IP Address\n") { - bsc_replace_string(_nat, &_nat->ussd_local, argv[0]); + osmo_talloc_replace_string(_nat, &_nat->ussd_local, argv[0]); return CMD_SUCCESS; } @@ -884,7 +884,7 @@ DEFUN(cfg_bsc_token, cfg_bsc_token_cmd, "token TOKEN", if (strncmp(conf->token, argv[0], 128) != 0) conf->token_updated = true; - bsc_replace_string(conf, &conf->token, argv[0]); + osmo_talloc_replace_string(conf, &conf->token, argv[0]); return CMD_SUCCESS; } @@ -983,7 +983,7 @@ DEFUN(cfg_bsc_acc_lst_name, { struct bsc_config *conf = vty->index; - bsc_replace_string(conf, &conf->acc_lst_name, argv[0]); + osmo_talloc_replace_string(conf, &conf->acc_lst_name, argv[0]); return CMD_SUCCESS; } @@ -1035,7 +1035,7 @@ DEFUN(cfg_bsc_desc, { struct bsc_config *conf = vty->index; - bsc_replace_string(conf, &conf->description, argv[0]); + osmo_talloc_replace_string(conf, &conf->description, argv[0]); return CMD_SUCCESS; } |