mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
operate: remove dependency of cmwp uci config
This commit is contained in:
parent
720d704121
commit
a9dff9e621
1 changed files with 4 additions and 18 deletions
22
dmoperate.c
22
dmoperate.c
|
|
@ -41,25 +41,11 @@ bool is_str_eq(const char *s1, const char *s2)
|
||||||
|
|
||||||
static void bbf_init(struct dmctx *dm_ctx, char *path)
|
static void bbf_init(struct dmctx *dm_ctx, char *path)
|
||||||
{
|
{
|
||||||
char *uci_amd = NULL, *uci_instance = NULL;
|
unsigned int amd = AMD_5, instance = INSTANCE_MODE_NUMBER;
|
||||||
int amd = AMD_2, instance = INSTANCE_MODE_ALIAS;
|
|
||||||
|
|
||||||
if(match(path, "[[]+")) {
|
if (match(path, "[[]+")) {
|
||||||
if(!match(path, GLOB_EXPR)) {
|
if (!match(path, GLOB_EXPR))
|
||||||
amd = AMD_5;
|
instance = INSTANCE_MODE_ALIAS;
|
||||||
}
|
|
||||||
} else {
|
|
||||||
dmuci_get_option_value_string("cwmp", "cpe", "amd_version", &uci_amd);
|
|
||||||
if(uci_amd) {
|
|
||||||
amd = atoi(uci_amd);
|
|
||||||
dmfree(uci_amd);
|
|
||||||
}
|
|
||||||
dmuci_get_option_value_string("cwmp", "cpe", "instance_mode", &uci_instance);
|
|
||||||
if(uci_instance) {
|
|
||||||
if(!is_str_eq(uci_instance, "InstanceAlias"))
|
|
||||||
instance = INSTANCE_MODE_NUMBER;
|
|
||||||
dmfree(uci_instance);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
dm_ctx_init_sub(dm_ctx, DM_CWMP, amd, instance);
|
dm_ctx_init_sub(dm_ctx, DM_CWMP, amd, instance);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue