mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-14 21:20:28 +01:00
Ticket refs #2483: TR-181: most Alias values are empty
This commit is contained in:
parent
f6b0352b83
commit
4c4d298b0d
28 changed files with 172 additions and 76 deletions
|
|
@ -2045,22 +2045,21 @@ static void codec_update_id()
|
|||
////////////////////////SET AND GET ALIAS/////////////////////////////////
|
||||
int get_service_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
struct uci_section *service_section = (struct uci_section *)data;
|
||||
dmuci_get_value_by_section_string(service_section, "vsalias", value);
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "vsalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_service_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||
{
|
||||
struct uci_section *service_section = (struct uci_section *)data;
|
||||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 64, NULL, 0, NULL, 0))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
dmuci_set_value_by_section(service_section, "vsalias", value);
|
||||
dmuci_set_value_by_section((struct uci_section *)data, "vsalias", value);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -2068,22 +2067,21 @@ static int set_service_alias(char *refparam, struct dmctx *ctx, void *data, char
|
|||
|
||||
int get_cap_codec_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
struct codec_args *cur_codec_args = (struct codec_args *)data;
|
||||
dmuci_get_value_by_section_string(cur_codec_args->codec_section, "codecalias", value);
|
||||
dmuci_get_value_by_section_string(((struct codec_args *)data)->codec_section, "codecalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_cap_codec_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||
{
|
||||
struct codec_args *cur_codec_args = (struct codec_args *)data;
|
||||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 64, NULL, 0, NULL, 0))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
dmuci_set_value_by_section(cur_codec_args->codec_section, "codecalias", value);
|
||||
dmuci_set_value_by_section(((struct codec_args *)data)->codec_section, "codecalias", value);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -2091,18 +2089,17 @@ static int set_cap_codec_alias(char *refparam, struct dmctx *ctx, void *data, ch
|
|||
|
||||
static int get_voice_profile_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
struct sip_args *sipargs = (struct sip_args *)data;
|
||||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_voice_client", "sip_service_provider", section_name(sipargs->sip_section), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "profilealias", value);
|
||||
get_dmmap_section_of_config_section("dmmap_voice_client", "sip_service_provider", section_name(((struct sip_args *)data)->sip_section), &dmmap_section);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "profilealias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_voice_profile_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||
{
|
||||
struct sip_args *sipargs = (struct sip_args *)data;
|
||||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
switch (action) {
|
||||
|
|
@ -2111,7 +2108,7 @@ static int set_voice_profile_alias(char *refparam, struct dmctx *ctx, void *data
|
|||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
get_dmmap_section_of_config_section("dmmap_voice_client", "sip_service_provider", section_name(sipargs->sip_section), &dmmap_section);
|
||||
get_dmmap_section_of_config_section("dmmap_voice_client", "sip_service_provider", section_name(((struct sip_args *)data)->sip_section), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_set_value_by_section(dmmap_section, "profilealias", value);
|
||||
return 0;
|
||||
|
|
@ -2121,18 +2118,17 @@ static int set_voice_profile_alias(char *refparam, struct dmctx *ctx, void *data
|
|||
|
||||
static int get_line_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
struct tel_args *telarg = (struct tel_args *)data;
|
||||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_voice_client", "tel_line", section_name(telarg->tel_section), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "linealias", value);
|
||||
get_dmmap_section_of_config_section("dmmap_voice_client", "tel_line", section_name(((struct tel_args *)data)->tel_section), &dmmap_section);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "linealias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_line_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||
{
|
||||
struct tel_args *telarg = (struct tel_args *)data;
|
||||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
switch (action) {
|
||||
|
|
@ -2141,7 +2137,7 @@ static int set_line_alias(char *refparam, struct dmctx *ctx, void *data, char *i
|
|||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
get_dmmap_section_of_config_section("dmmap_voice_client", "tel_line", section_name(telarg->tel_section), &dmmap_section);
|
||||
get_dmmap_section_of_config_section("dmmap_voice_client", "tel_line", section_name(((struct tel_args *)data)->tel_section), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_set_value_by_section(dmmap_section, "linealias", value);
|
||||
return 0;
|
||||
|
|
@ -2152,6 +2148,8 @@ static int set_line_alias(char *refparam, struct dmctx *ctx, void *data, char *i
|
|||
static int get_line_codec_list_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct line_codec_args *)data)->codec_sec, "codecalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -344,6 +344,8 @@ static int set_BulkDataProfile_Enable(char *refparam, struct dmctx *ctx, void *d
|
|||
static int get_BulkDataProfile_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "profile_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -226,6 +226,8 @@ static int get_SoftwareModulesExecEnv_Alias(char *refparam, struct dmctx *ctx, v
|
|||
dmuci_get_value_by_section_string(s, "name", &env_name);
|
||||
if (strcmp(env_name, name) == 0) {
|
||||
dmuci_get_value_by_section_string(s, "alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -384,6 +386,8 @@ static int get_SoftwareModulesDeploymentUnit_Alias(char *refparam, struct dmctx
|
|||
dmuci_get_value_by_section_string(s, "environment", &du_env);
|
||||
if ((strcmp(du_name, name) == 0) && (strcmp(du_env, environment) == 0)) {
|
||||
dmuci_get_value_by_section_string(s, "alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -553,6 +557,8 @@ static int get_SoftwareModulesExecutionUnit_Alias(char *refparam, struct dmctx *
|
|||
dmuci_get_value_by_section_string(s, "environment", &eu_env);
|
||||
if ((strcmp(eu_euid, euid) == 0) && (strcmp(eu_env, environment) == 0)) {
|
||||
dmuci_get_value_by_section_string(s, "alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ struct atm_args
|
|||
static int get_atm_linker(char *refparam, struct dmctx *dmctx, void *data, char *instance, char **linker)
|
||||
{
|
||||
if (data && ((struct atm_args *)data)->ifname) {
|
||||
*linker = ((struct atm_args *)data)->ifname;
|
||||
*linker = ((struct atm_args *)data)->ifname;
|
||||
return 0;
|
||||
}
|
||||
*linker = "" ;
|
||||
|
|
@ -323,8 +323,9 @@ static int get_atm_alias(char *refparam, struct dmctx *ctx, void *data, char *in
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_dsl", "atm-device", section_name(((struct atm_args *)data)->atm_sec), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "atmlinkalias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "atmlinkalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -385,7 +386,7 @@ DMOBJ tATMLinkObj[] = {
|
|||
|
||||
DMLEAF tATMLinkParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_atm_alias, set_atm_alias, NULL, NULL, BBFDM_BOTH},
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_atm_alias, set_atm_alias, NULL, NULL, BBFDM_BOTH},
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_atm_enable, set_atm_enable, NULL, NULL, BBFDM_BOTH},
|
||||
{"Name", &DMREAD, DMT_STRING, get_atm_link_name, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"Status", &DMREAD, DMT_STRING, get_atm_status, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
|
|
|
|||
|
|
@ -993,6 +993,8 @@ static int get_br_alias(char *refparam, struct dmctx *ctx, void *data, char *ins
|
|||
|
||||
get_dmmap_section_of_config_section("dmmap_network", "interface", section_name(((struct bridging_args *)data)->bridge_sec), &dmmap_section);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "bridge_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1059,9 +1061,10 @@ static int get_br_vlan_alias(char *refparam, struct dmctx *ctx, void *data, char
|
|||
{
|
||||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
/* Interface section needs to be browsed to get the value for vlan alias. */
|
||||
get_dmmap_section_of_config_section("dmmap_network", "interface", section_name(((struct bridging_vlan_args *)data)->bridge_vlan_sec), &dmmap_section);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "bridge_vlan_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -171,6 +171,8 @@ static int get_vcf_desc(char *refparam, struct dmctx *ctx, void *data, char *ins
|
|||
static int get_vcf_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "vcf_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -207,6 +209,8 @@ static int check_file_dir(char *name)
|
|||
static int get_vlf_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "vlf_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -553,8 +553,9 @@ static int get_server_pool_alias(char *refparam, struct dmctx *ctx, void *data,
|
|||
struct uci_section *dmmap_sect = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_dhcp", "dhcp", section_name(((struct dhcp_args *)data)->dhcp_sec), &dmmap_sect);
|
||||
if (dmmap_sect)
|
||||
dmuci_get_value_by_section_string(dmmap_sect, "dhcp_alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_sect, "dhcp_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1231,8 +1232,9 @@ static int get_dhcp_static_alias(char *refparam, struct dmctx *ctx, void *data,
|
|||
{
|
||||
struct uci_section *dmmap_section = NULL;
|
||||
get_dmmap_section_of_config_section("dmmap_dhcp", "host", section_name(((struct dhcp_static_args *)data)->dhcpsection), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ldhcpalias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ldhcpalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1395,7 +1397,8 @@ static int set_DHCPv4Client_Enable(char *refparam, struct dmctx *ctx, void *data
|
|||
static int get_DHCPv4Client_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct dhcp_client_args *)data)->dhcp_client_dm, "bbf_dhcpv4client_alias", value);
|
||||
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1697,6 +1700,8 @@ static int set_DHCPv4ClientSentOption_Enable(char *refparam, struct dmctx *ctx,
|
|||
static int get_DHCPv4ClientSentOption_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct dhcp_client_option_args *)data)->opt_sect, "bbf_dhcpv4_sentopt_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1829,6 +1834,8 @@ static int set_DHCPv4ClientReqOption_Enable(char *refparam, struct dmctx *ctx, v
|
|||
static int get_DHCPv4ClientReqOption_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct dhcp_client_option_args *)data)->opt_sect, "bbf_dhcpv4_reqtopt_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1958,6 +1965,8 @@ static int get_DHCPv4Server_PoolNumberOfEntries(char *refparam, struct dmctx *ct
|
|||
static int get_DHCPv4ServerPoolOption_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct dhcp_client_option_args *)data)->opt_sect, "bbf_dhcpv4_servpool_option_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2092,6 +2101,8 @@ static int set_DHCPv4RelayForwarding_Enable(char *refparam, struct dmctx *ctx, v
|
|||
static int get_DHCPv4RelayForwarding_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct dhcp_client_args *)data)->dhcp_client_dm, "bbf_dhcpv4relay_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -509,6 +509,8 @@ static int set_DHCPv6Client_Enable(char *refparam, struct dmctx *ctx, void *data
|
|||
static int get_DHCPv6Client_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct dhcpv6_client_args *)data)->dhcp_client_dm, "bbf_dhcpv6client_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -833,8 +835,9 @@ static int get_DHCPv6ServerPool_Alias(char *refparam, struct dmctx *ctx, void *d
|
|||
struct uci_section *dmmap_sect = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_dhcpv6", "dhcp", section_name(((struct dhcpv6_args *)data)->dhcp_sec), &dmmap_sect);
|
||||
if (dmmap_sect)
|
||||
dmuci_get_value_by_section_string(dmmap_sect, "dhcpv6_serv_pool_alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_sect, "dhcpv6_serv_pool_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1236,6 +1239,8 @@ static int set_DHCPv6ServerPoolOption_Enable(char *refparam, struct dmctx *ctx,
|
|||
static int get_DHCPv6ServerPoolOption_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct dhcpv6_client_option_args *)data)->opt_sect, "bbf_dhcpv6_servpool_option_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -309,6 +309,8 @@ static int get_server_status(char *refparam, struct dmctx *ctx, void *data, char
|
|||
static int get_server_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "dns_server_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -395,6 +397,8 @@ static int get_forwarding_status(char *refparam, struct dmctx *ctx, void *data,
|
|||
static int get_forwarding_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "dns_server_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -269,6 +269,8 @@ static int get_DSLLine_Status(char *refparam, struct dmctx *ctx, void *data, cha
|
|||
static int get_DSLLine_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct dsl_line_args *)data)->line_sec, "dsl_line_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -896,6 +898,8 @@ static int get_DSLChannel_Status(char *refparam, struct dmctx *ctx, void *data,
|
|||
static int get_DSLChannel_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct dsl_channel_args *)data)->channel_sec, "dsl_channel_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -397,8 +397,9 @@ static int get_DynamicDNSClient_Alias(char *refparam, struct dmctx *ctx, void *d
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_ddns", "service", section_name((struct uci_section *)data), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "clientalias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "clientalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -749,6 +750,8 @@ static int set_DynamicDNSServer_Name(char *refparam, struct dmctx *ctx, void *da
|
|||
static int get_DynamicDNSServer_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "serveralias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -804,6 +804,8 @@ static int get_EthernetLink_Status(char *refparam, struct dmctx *ctx, void *data
|
|||
static int get_EthernetLink_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct dm_args *)data)->section, "link_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1220,6 +1222,8 @@ static int get_EthernetVLANTermination_Alias(char *refparam, struct dmctx *ctx,
|
|||
|
||||
get_dmmap_section_of_config_section("dmmap_network", "device", section_name(((struct dm_args *)data)->section), &dmmap_section);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "vlan_term_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -230,8 +230,9 @@ static int get_GRETunnel_Alias(char *refparam, struct dmctx *ctx, void *data, ch
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_network", "interface", section_name(((struct dmmap_dup *)data)->config_section), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "gretunnel_alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "gretunnel_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -334,8 +335,9 @@ static int get_GRETunnelInterface_Alias(char *refparam, struct dmctx *ctx, void
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_network", "interface", section_name(((struct dmmap_dup *)data)->config_section), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "greiface_alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "greiface_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -467,6 +467,8 @@ static int get_InterfaceStack_Alias(char *refparam, struct dmctx *ctx, void *dat
|
|||
struct uci_section *s = NULL;
|
||||
uci_path_foreach_option_eq(bbfdm, "dmmap_interface_stack", "interface_stack", "interface_stack_instance", instance, s) {
|
||||
dmuci_get_value_by_section_string(s, "interface_stack_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1188,6 +1188,8 @@ static int get_IPInterfaceTWAMPReflector_Status(char *refparam, struct dmctx *ct
|
|||
static int get_IPInterfaceTWAMPReflector_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "twamp_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1293,8 +1295,9 @@ static int get_IPInterface_Alias(char *refparam, struct dmctx *ctx, void *data,
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_network", "interface", section_name(((struct ip_args *)data)->ip_sec), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ip_int_alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ip_int_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1321,8 +1324,9 @@ static int get_ipv4_alias(char *refparam, struct dmctx *ctx, void *data, char *i
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_network", "interface", section_name(((struct ip_args *)data)->ip_sec), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ipv4_alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ipv4_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1351,8 +1355,11 @@ static int get_IPInterfaceIPv6Address_Alias(char *refparam, struct dmctx *ctx, v
|
|||
|
||||
uci_path_foreach_option_eq(bbfdm, "dmmap_network", "ipv6", "ipv6_instance", instance, dmmap_section) {
|
||||
dmuci_get_value_by_section_string(dmmap_section, "section_name", &name);
|
||||
if(strcmp(name, section_name(((struct ipv6_args *)data)->ip_sec)) == 0)
|
||||
if (strcmp(name, section_name(((struct ipv6_args *)data)->ip_sec)) == 0) {
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ipv6_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1387,8 +1394,11 @@ static int get_IPInterfaceIPv6Prefix_Alias(char *refparam, struct dmctx *ctx, vo
|
|||
|
||||
uci_path_foreach_option_eq(bbfdm, "dmmap_network", "ipv6prefix", "ipv6prefix_instance", instance, dmmap_section) {
|
||||
dmuci_get_value_by_section_string(dmmap_section, "section_name", &name);
|
||||
if(strcmp(name, section_name(((struct ipv6prefix_args *)data)->ip_sec)) == 0)
|
||||
if(strcmp(name, section_name(((struct ipv6prefix_args *)data)->ip_sec)) == 0) {
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ipv6prefix_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,8 +195,9 @@ static int get_nat_interface_setting_alias(char *refparam, struct dmctx *ctx, vo
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_firewall", "zone", section_name((struct uci_section *)data), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "interface_setting_alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "interface_setting_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -304,8 +305,9 @@ static int get_nat_port_mapping_alias(char *refparam, struct dmctx *ctx, void *d
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_firewall", "redirect", section_name((struct uci_section *)data), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "port_mapping_alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "port_mapping_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,9 @@ static int get_ppp_alias(char *refparam, struct dmctx *ctx, void *data, char *in
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_network", "interface", section_name((struct uci_section *)data), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ppp_int_alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ppp_int_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -214,8 +214,9 @@ static int get_ptm_alias(char *refparam, struct dmctx *ctx, void *data, char *in
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_dsl", "ptm-device", section_name(((struct ptm_args *)data)->ptm_sec), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ptmlinkalias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ptmlinkalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2803,8 +2803,11 @@ static int get_QoSQueue_Status(char *refparam, struct dmctx *ctx, void *data, ch
|
|||
static int get_QoSQueue_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_qos", "queue", section_name((struct uci_section *)data), &dmmap_section);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "queuealias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -3238,8 +3241,11 @@ static int get_QoSShaper_Status(char *refparam, struct dmctx *ctx, void *data, c
|
|||
static int get_QoSShaper_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_qos", "shaper", section_name((struct uci_section *)data), &dmmap_section);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "shaperalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -759,6 +759,8 @@ static int get_QoSClassification_Alias(char *refparam, struct dmctx *ctx, void *
|
|||
{
|
||||
struct dmmap_dup *p= (struct dmmap_dup*)data;
|
||||
dmuci_get_value_by_section_string(p->dmmap_section, "classifalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -3544,6 +3546,8 @@ static int get_QoSQueueStats_Alias(char *refparam, struct dmctx *ctx, void *data
|
|||
{
|
||||
struct queuestats *qts= (struct queuestats*)data;
|
||||
dmuci_get_value_by_section_string(qts->dmsect, "queuestatsalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1007,6 +1007,8 @@ static int get_RoutingRouteInformationInterfaceSetting_RouteLifetime(char *refpa
|
|||
static int get_RoutingRouter_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "router_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1034,8 +1036,9 @@ static int get_router_ipv4forwarding_alias(char *refparam, struct dmctx *ctx, vo
|
|||
get_dmmap_section_of_config_section("dmmap_route_forwarding", "route", section_name(((struct routingfwdargs *)data)->routefwdsection), &dmmap_section);
|
||||
else
|
||||
get_dmmap_section_of_config_section("dmmap_route_forwarding", "route_disabled", section_name(((struct routingfwdargs *)data)->routefwdsection), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "routealias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "routealias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1070,8 +1073,9 @@ static int get_RoutingRouterIPv6Forwarding_Alias(char *refparam, struct dmctx *c
|
|||
dmmap_section = ((struct routingfwdargs *)data)->routefwdsection;
|
||||
else
|
||||
get_dmmap_section_of_config_section("dmmap_route_forwarding", "route6", section_name(((struct routingfwdargs *)data)->routefwdsection), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "route6alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "route6alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -489,6 +489,8 @@ static int get_USBInterface_Alias(char *refparam, struct dmctx *ctx, void *data,
|
|||
{
|
||||
struct usb_interface *usbiface= (struct usb_interface *)data;
|
||||
dmuci_get_value_by_section_string(usbiface->dm_usb_iface, "usb_iface_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -594,6 +596,8 @@ static int get_USBPort_Alias(char *refparam, struct dmctx *ctx, void *data, char
|
|||
{
|
||||
struct usb_port* port=(struct usb_port *)data;
|
||||
dmuci_get_value_by_section_string(port->dm_usb_port, "usb_port_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -696,6 +700,8 @@ static int get_USBUSBHostsHost_Alias(char *refparam, struct dmctx *ctx, void *da
|
|||
{
|
||||
struct usb_port* port=(struct usb_port *)data;
|
||||
dmuci_get_value_by_section_string(port->dm_usb_port, "usb_host_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -108,8 +108,9 @@ static int get_user_alias(char *refparam, struct dmctx *ctx, void *data, char *i
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_users", "user", section_name((struct uci_section *)data), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "user_alias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "user_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1608,8 +1608,9 @@ static int get_WiFiEndPoint_Alias(char *refparam, struct dmctx *ctx, void *data,
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_wireless", "wifi-iface", section_name(((struct wifi_enp_args *)data)->wifi_enp_sec), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "endpointalias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "endpointalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1670,11 +1671,11 @@ static int get_WiFiEndPointProfile_Alias(char *refparam, struct dmctx *ctx, void
|
|||
char *epinst = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_wireless", "wifi-iface", section_name((struct uci_section*)data), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "endpointinstance", &epinst);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "endpointinstance", &epinst);
|
||||
get_dmmap_section_of_config_section_eq("dmmap_wireless", "ep_profile", "ep_key", epinst, &dm);
|
||||
if (dm)
|
||||
dmuci_get_value_by_section_string(dm, "ep_profile_alias", value);
|
||||
dmuci_get_value_by_section_string(dm, "ep_profile_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2035,8 +2036,9 @@ static int get_radio_alias(char *refparam, struct dmctx *ctx, void *data, char *
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_wireless", "wifi-device", section_name(((struct wifi_radio_args *)data)->wifi_radio_sec), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "radioalias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "radioalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2063,8 +2065,9 @@ static int get_ssid_alias(char *refparam, struct dmctx *ctx, void *data, char *i
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_wireless", "wifi-iface", section_name(((struct wifi_ssid_args *)data)->wifi_ssid_sec), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ssidalias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "ssidalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2091,8 +2094,9 @@ static int get_access_point_alias(char *refparam, struct dmctx *ctx, void *data,
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_wireless", "wifi-iface", section_name(((struct wifi_acp_args *)data)->wifi_acp_sec), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "accesspointalias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "accesspointalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,8 +132,9 @@ static int get_x_iopsys_eu_button_alias(char *refparam, struct dmctx *ctx, void
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_buttons", "button", section_name((struct uci_section *)data), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "buttonalias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "buttonalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -323,8 +323,9 @@ static int get_x_iopsys_eu_dropbear_alias(char *refparam, struct dmctx *ctx, voi
|
|||
struct uci_section *dmmap_section = NULL;
|
||||
|
||||
get_dmmap_section_of_config_section("dmmap_dropbear", "dropbear", section_name((struct uci_section *)data), &dmmap_section);
|
||||
if (dmmap_section)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "dropbearalias", value);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "dropbearalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -243,6 +243,8 @@ static int get_x_iopsys_eu_owsd_virtualhost_alias(char *refparam, struct dmctx *
|
|||
|
||||
get_dmmap_section_of_config_section("dmmap_owsd", "owsd-listen", section_name((struct uci_section *)data), &dmmap_section);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "olistenalias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,6 +121,8 @@ static int set_connection_enable(char *refparam, struct dmctx *ctx, void *data,
|
|||
static int get_xmpp_connection_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "connection_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -433,6 +435,8 @@ static int set_xmpp_connection_server_enable(char *refparam, struct dmctx *ctx,
|
|||
static int get_xmpp_connection_server_alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "connection_server_alias", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "cpe-%s", instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue