mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Generate portable handset names based on reg id
This commit is contained in:
parent
361db56939
commit
cd33c79351
1 changed files with 8 additions and 2 deletions
|
|
@ -16,9 +16,15 @@
|
|||
static int get_ServicesVoiceServiceDECTPortable_Name(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
char *ipui = dmjson_get_value((json_object *)data, 1, "ipui");
|
||||
char *id = dmjson_get_value((json_object *)data, 1, "id");
|
||||
|
||||
dmuci_get_option_value_string("dect", ipui, "name", value);
|
||||
if ((*value)[0] == '\0')
|
||||
dmasprintf(value, "DECT%s", instance);
|
||||
if ((*value)[0] == '\0') {
|
||||
if (strlen(id))
|
||||
dmasprintf(value, "DECT%s", id);
|
||||
else
|
||||
dmasprintf(value, "DECT%s", instance);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue