Skip to content
Snippets Groups Projects
Unverified Commit 34faea6f authored by Vivek Dutta's avatar Vivek Dutta
Browse files

Proxy object name simplified

parent 93d30270
No related branches found
No related tags found
1 merge request!9Proxy object name simplified
......@@ -324,6 +324,7 @@ void onboard_agent(char *endpoint_id)
struct uci_package *pkg;
struct uci_element *e;
bool found = false;
int count = 0;
ctx = uci_alloc_context();
if (!ctx)
......@@ -355,6 +356,7 @@ void onboard_agent(char *endpoint_id)
found = true;
break;
}
count++;
}
if (found) {
......@@ -376,7 +378,7 @@ void onboard_agent(char *endpoint_id)
char topic[1024] = {0};
snprintf(topic, sizeof(topic), "/usp/%s/endpoint", name);
char prefix[1024] = {0};
snprintf(prefix, sizeof(prefix), "Device.Services.Proxy%s.", name);
snprintf(prefix, sizeof(prefix), "Device.Services.Proxy%d.", count);
obuspc_uci_rename_section(ctx, s, name);
obuspc_uci_set_value(ctx, name, "EndpointID", endpoint_id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment