aco_option_register_custom(&cfg_info, "connection", ACO_EXACT, endpoint_options, NULL, custom_connection_handler, 0);
aco_option_register_custom(&cfg_info, "transport", ACO_EXACT, endpoint_options, NULL, custom_transport_handler, 0);
aco_option_register(&cfg_info, "maxicecandidates", ACO_EXACT, endpoint_options, DEFAULT_MAX_ICE_CANDIDATES, OPT_UINT_T, PARSE_DEFAULT,
- FLDSET(struct jingle_endpoint, maxicecandidates));
+ FLDSET(struct jingle_endpoint, maxicecandidates), DEFAULT_MAX_ICE_CANDIDATES);
aco_option_register(&cfg_info, "maxpayloads", ACO_EXACT, endpoint_options, DEFAULT_MAX_PAYLOADS, OPT_UINT_T, PARSE_DEFAULT,
- FLDSET(struct jingle_endpoint, maxpayloads));
+ FLDSET(struct jingle_endpoint, maxpayloads), DEFAULT_MAX_PAYLOADS);
ast_format_cap_add_all_by_type(jingle_tech.capabilities, AST_FORMAT_TYPE_AUDIO);
static int unload_module(void)
{
ast_channel_unregister(&jingle_tech);
+ ast_format_cap_destroy(jingle_tech.capabilities);
+ jingle_tech.capabilities = NULL;
ast_rtp_glue_unregister(&jingle_rtp_glue);
ast_sched_context_destroy(sched);
aco_info_destroy(&cfg_info);
struct http_uri_redirect *redirect;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
uint32_t bindport = DEFAULT_PORT;
- struct ast_sockaddr *addrs = NULL;
+ RAII_VAR(struct ast_sockaddr *, addrs, NULL, ast_free);
int num_addrs = 0;
int http_tls_was_enabled = 0;
AST_CLI_DEFINE(handle_show_named_acl_cmd, "Show a named ACL or list all named ACLs"),
};
+static void named_acl_cleanup(void)
+{
+ aco_info_destroy(&cfg_info);
+ ao2_global_obj_release(globals);
+}
+
int ast_named_acl_init()
{
ast_cli_register_multiple(cli_named_acl, ARRAY_LEN(cli_named_acl));
+ ast_register_atexit(named_acl_cleanup);
+
if (aco_info_init(&cfg_info)) {
return 0;
}