From 30987271e6d3c9eb202997494690ed102adeca87 Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 11 Aug 2015 01:48:47 +0200 Subject: HPM Hooks Update --- src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/plugins/HPMHooking/HPMHooking_login.Hooks.inc') diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index 588fddcb0..94b298d36 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -325,6 +325,33 @@ void HP_console_display_title(void) { } return; } +/* core */ +void HP_core_shutdown_callback(void) { + int hIndex = 0; + if( HPMHooks.count.HP_core_shutdown_callback_pre ) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func; + preHookFunc(); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.core.shutdown_callback(); + } + if( HPMHooks.count.HP_core_shutdown_callback_post ) { + void (*postHookFunc) (void); + for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func; + postHookFunc(); + } + } + return; +} /* DB */ DBOptions HP_DB_fix_options(DBType type, DBOptions options) { int hIndex = 0; -- cgit v1.2.3-60-g2f50