mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
Merge "stasis: Improve topic/subscription names and statistics." into 16
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user