summaryrefslogtreecommitdiff
path: root/main/stasis_endpoints.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/stasis_endpoints.c')
-rw-r--r--main/stasis_endpoints.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/stasis_endpoints.c b/main/stasis_endpoints.c
index 3f8d32419..e3f5a3f15 100644
--- a/main/stasis_endpoints.c
+++ b/main/stasis_endpoints.c
@@ -193,7 +193,11 @@ struct ast_endpoint_snapshot *ast_endpoint_latest_snapshot(const char *tech,
RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
struct ast_endpoint_snapshot *snapshot;
- ast_asprintf(&id, "%s/%s", tech, name);
+ if (ast_strlen_zero(name)) {
+ ast_asprintf(&id, "%s", tech);
+ } else {
+ ast_asprintf(&id, "%s/%s", tech, name);
+ }
if (!id) {
return NULL;
}