Merge "stasis: Improve topic/subscription names and statistics." into 16

This commit is contained in:
Joshua C. Colp
2019-03-14 09:19:37 -05:00
committed by Gerrit Code Review
23 changed files with 214 additions and 63 deletions

View File

@@ -1131,7 +1131,7 @@ static int load_module(void)
goto failed;
}
corosync_aggregate_topic = stasis_topic_create("corosync_aggregate_topic");
corosync_aggregate_topic = stasis_topic_create("corosync:aggregator");
if (!corosync_aggregate_topic) {
ast_log(AST_LOG_ERROR, "Failed to create stasis topic for corosync\n");
goto failed;

View File

@@ -959,6 +959,8 @@ struct stasis_app *app_create(const char *name, stasis_app_cb handler, void *dat
int res = 0;
size_t context_size = strlen("stasis-") + strlen(name) + 1;
char context_name[context_size];
char *topic_name;
int ret;
ast_assert(name != NULL);
ast_assert(handler != NULL);
@@ -979,7 +981,13 @@ struct stasis_app *app_create(const char *name, stasis_app_cb handler, void *dat
return NULL;
}
app->topic = stasis_topic_create(name);
ret = ast_asprintf(&topic_name, "ari:application/%s", name);
if (ret < 0) {
return NULL;
}
app->topic = stasis_topic_create(topic_name);
ast_free(topic_name);
if (!app->topic) {
return NULL;
}