mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Get method: Show only the first resolved reference for micro-service object
This commit is contained in:
parent
5b52a9c6c3
commit
01c0c3769e
1 changed files with 2 additions and 3 deletions
|
|
@ -858,7 +858,6 @@ static char *get_value_by_reference(struct dmctx *ctx, char *value)
|
|||
char buf[MAX_DM_PATH * 4] = {0};
|
||||
char buf_val[MAX_DM_PATH * 4] = {0};
|
||||
bool path_resolved = false;
|
||||
unsigned pos = 0;
|
||||
|
||||
if (DM_STRLEN(value) == 0 || !DM_STRSTR(value, "=="))
|
||||
return value;
|
||||
|
|
@ -895,12 +894,12 @@ static char *get_value_by_reference(struct dmctx *ctx, char *value)
|
|||
|
||||
if (DM_STRLEN(val)) {
|
||||
path_resolved = true;
|
||||
pos += snprintf(&buf_val[pos], sizeof(buf_val) - pos, "%s,", val);
|
||||
snprintf(buf_val, sizeof(buf_val), "%s", val);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (path_resolved) {
|
||||
buf_val[pos - 1] = 0;
|
||||
return dmstrdup(buf_val);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue