mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-02-08 04:50:41 +01:00
Device.DSL.Channel.{i}.Status: add the missing cases according to the standard
This commit is contained in:
parent
07975229f1
commit
00adaec949
1 changed files with 14 additions and 1 deletions
|
|
@ -906,7 +906,20 @@ static int set_DSLChannel_Enable(char *refparam, struct dmctx *ctx, void *data,
|
|||
static int get_DSLChannel_Status(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
char *status = get_dsl_value_without_argument("dsl.channel", ((struct dsl_channel_args*)data)->id, "status", "status");
|
||||
*value = (strcmp(status, "up") == 0) ? "Up" : "Down";
|
||||
if (strcmp(status, "up") == 0)
|
||||
*value = "Up";
|
||||
else if (strcmp(status, "down") == 0)
|
||||
*value = "Down";
|
||||
else if (strcmp(status, "dormant") == 0)
|
||||
*value = "Dormant";
|
||||
else if (strcmp(status, "not_present") == 0)
|
||||
*value = "NotPresent";
|
||||
else if (strcmp(status, "lower_layer_down") == 0)
|
||||
*value = "LowerLayerDown";
|
||||
else if (strcmp(status, "error") == 0)
|
||||
*value = "Error";
|
||||
else
|
||||
*value = "Unknown";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue