コード例 #1
0
static void register_hook(void) {

	/* Unregister the hook, we don't want a double-registration (Bad Things(tm) happen) */
	ast_manager_unregister_hook(&test_hook);

	/* Register the hook for AMI events */
	ast_manager_register_hook(&test_hook);

}
コード例 #2
0
ファイル: test_message.c プロジェクト: LorneyZizzart/asterisk
static int unload_module(void)
{
	AST_TEST_UNREGISTER(test_message_msg_tech_registration);
	AST_TEST_UNREGISTER(test_message_msg_handler_registration);
	AST_TEST_UNREGISTER(test_message_manipulation);
	AST_TEST_UNREGISTER(test_message_queue_dialplan_nominal);
	AST_TEST_UNREGISTER(test_message_queue_handler_nominal);
	AST_TEST_UNREGISTER(test_message_queue_both_nominal);
	AST_TEST_UNREGISTER(test_message_has_destination_dialplan);
	AST_TEST_UNREGISTER(test_message_has_destination_handler);
	AST_TEST_UNREGISTER(test_message_msg_send);

	ast_context_destroy(NULL, AST_MODULE);

	ast_manager_unregister_hook(&user_event_hook);

	return 0;
}
コード例 #3
0
static void unregister_hook(void) {

	/* Unregister the hook */
	ast_manager_unregister_hook(&test_hook);

}
コード例 #4
0
static int unload_module(void)
{
	ast_manager_unregister_hook(&test_hook);
	return ast_cli_unregister_multiple(cli_amihook_evt, ARRAY_LEN(cli_amihook_evt));
}