mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-02-22 04:12:37 +01:00
Add the parameter Device.ManagementServer.EnableCWMP
This commit is contained in:
parent
35633a3bc8
commit
973a955ff0
1 changed files with 26 additions and 0 deletions
|
|
@ -586,6 +586,31 @@ static int get_management_server_instance_wildcard_supported(char *refparam, str
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int get_management_server_enable_cwmp(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_option_value_string("cwmp", "cpe", "enable", value);
|
||||
if ((*value)[0] == '\0')
|
||||
*value = "1";
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_management_server_enable_cwmp(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||
{
|
||||
bool b;
|
||||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_boolean(value))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
string_to_bool(value, &b);
|
||||
dmuci_set_value("cwmp", "cpe", "enable", b ? "1" : "0");
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************************
|
||||
* OBJ & PARAM DEFINITION
|
||||
***********************************************************************************************************************************/
|
||||
|
|
@ -620,5 +645,6 @@ DMLEAF tManagementServerParams[] = {
|
|||
{"ConnReqXMPPConnection", &DMWRITE, DMT_STRING, get_management_server_conn_req_xmpp_connection, set_management_server_conn_req_xmpp_connection, BBFDM_CWMP, "2.7"},
|
||||
{"SupportedConnReqMethods", &DMREAD, DMT_STRING, get_management_server_supported_conn_req_methods, NULL, BBFDM_CWMP, "2.7"},
|
||||
{"InstanceWildcardsSupported", &DMREAD, DMT_BOOL, get_management_server_instance_wildcard_supported, NULL, BBFDM_CWMP, "2.12"},
|
||||
{"EnableCWMP", &DMWRITE, DMT_BOOL, get_management_server_enable_cwmp, set_management_server_enable_cwmp, BBFDM_CWMP, "2.12"},
|
||||
{0}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue