mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-01-27 17:17:17 +01:00
Merge branch '4.3_17388' into 'release-4.3'
Refs #17338: tr-98... See merge request iopsys/icwmp!15
This commit is contained in:
commit
7491e61171
2 changed files with 34 additions and 1 deletions
|
|
@ -56,6 +56,7 @@ DMLEAF X_IOPSYS_EU_ListenObjParams[] = {
|
|||
{"UbusCert", &DMWRITE, DMT_STRING, get_x_iopsys_eu_owsd_ubus_cert, set_x_iopsys_eu_owsd_ubus_cert, NULL, NULL},
|
||||
{"UbusKey", &DMWRITE, DMT_STRING, get_x_iopsys_eu_owsd_ubus_key, set_x_iopsys_eu_owsd_ubus_key, NULL, NULL},
|
||||
{"UbusCa", &DMWRITE, DMT_STRING, get_x_iopsys_eu_owsd_ubus_ca, set_x_iopsys_eu_owsd_ubus_ca, NULL, NULL},
|
||||
{"UserSupport", &DMWRITE, DMT_STRING, get_x_iopsys_eu_owsd_user_support, set_x_iopsys_eu_owsd_user_support, NULL, NULL},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
|
@ -525,6 +526,36 @@ int set_x_iopsys_eu_owsd_ubus_ca(char *refparam, struct dmctx *ctx, void *data,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int get_x_iopsys_eu_owsd_user_support(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value){
|
||||
struct uci_section *owsd_listensection = (struct uci_section *)data;
|
||||
struct uci_list *val;
|
||||
|
||||
dmuci_get_value_by_section_list(owsd_listensection, "user", &val);
|
||||
if (val)
|
||||
*value = dmuci_list_to_string(val, " ");
|
||||
else
|
||||
*value = "";
|
||||
return 0;
|
||||
}
|
||||
|
||||
int set_x_iopsys_eu_owsd_user_support(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action){
|
||||
struct uci_section *owsd_listensection = (struct uci_section *)data;
|
||||
char *pch=NULL, *spch=NULL;
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
return 0;
|
||||
case VALUESET:
|
||||
dmuci_delete_by_section(owsd_listensection, "user", NULL);
|
||||
pch = strtok_r(value, " ", &spch);
|
||||
while (pch != NULL) {
|
||||
dmuci_add_list_value_by_section(owsd_listensection, "user", pch);
|
||||
pch = strtok_r(NULL, " ", &spch);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***** ADD DEL OBJ *******/
|
||||
int add_owsd_listen(char *refparam, struct dmctx *ctx, void *data, char **instancepara)
|
||||
{
|
||||
|
|
@ -588,4 +619,4 @@ int delete_owsd_listen_instance(char *refparam, struct dmctx *ctx, void *data, c
|
|||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -35,6 +35,8 @@ int get_x_iopsys_eu_owsd_ubus_key(char *refparam, struct dmctx *ctx, void *data,
|
|||
int set_x_iopsys_eu_owsd_ubus_key(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action);
|
||||
int get_x_iopsys_eu_owsd_ubus_ca(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value);
|
||||
int set_x_iopsys_eu_owsd_ubus_ca(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action);
|
||||
int get_x_iopsys_eu_owsd_user_support(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value);
|
||||
int set_x_iopsys_eu_owsd_user_support(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action);
|
||||
|
||||
int add_owsd_listen(char *refparam, struct dmctx *ctx, void *data, char **instancepara);
|
||||
int delete_owsd_listen_instance(char *refparam, struct dmctx *ctx, void *data, char *instance, unsigned char del_action);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue