mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-11 07:13:20 +00:00
Stasis: Allow message types to be blocked
This introduces stasis.conf and a mechanism to prevent certain message types from being published. Internally, this works by preventing the chosen message types from being created which ensures that those message types can never be published. This patch also adjusts message publishers such that message payloads are not created if the related message type is not available. ASTERISK-23943 #close Review: https://reviewboard.asterisk.org/r/3823/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
11
main/test.c
11
main/test.c
@@ -1015,15 +1015,22 @@ struct ast_json *ast_test_suite_get_blob(struct ast_test_suite_message_payload *
|
||||
void __ast_test_suite_event_notify(const char *file, const char *func, int line, const char *state, const char *fmt, ...)
|
||||
{
|
||||
RAII_VAR(struct ast_test_suite_message_payload *, payload,
|
||||
ao2_alloc(sizeof(*payload), test_suite_message_payload_dtor),
|
||||
NULL,
|
||||
ao2_cleanup);
|
||||
RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
|
||||
RAII_VAR(struct ast_str *, buf, ast_str_create(128), ast_free);
|
||||
RAII_VAR(struct ast_str *, buf, NULL, ast_free);
|
||||
va_list ap;
|
||||
|
||||
if (!ast_test_suite_message_type()) {
|
||||
return;
|
||||
}
|
||||
|
||||
buf = ast_str_create(128);
|
||||
if (!buf) {
|
||||
return;
|
||||
}
|
||||
|
||||
payload = ao2_alloc(sizeof(*payload), test_suite_message_payload_dtor);
|
||||
if (!payload) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user