summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2015-04-17 19:25:59 +0200
committerHaruna <haru@dotalux.com>2015-04-17 19:25:59 +0200
commit25f27b58724f053f4829d63eb720fed5768f3128 (patch)
tree5cc3c987af2a4ccdc3f9528cd02dd1c2a6ae266f /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
parent6507a9d475a2467b8d394177e95c2c524bf70544 (diff)
parentdda4f86ce41e63011a1f6ef858b093ce388c912d (diff)
downloadhercules-25f27b58724f053f4829d63eb720fed5768f3128.tar.gz
hercules-25f27b58724f053f4829d63eb720fed5768f3128.tar.bz2
hercules-25f27b58724f053f4829d63eb720fed5768f3128.tar.xz
hercules-25f27b58724f053f4829d63eb720fed5768f3128.zip
Merge pull request #495 from 4144/extjobdb
Allow for plugins read custom fields from jobdb1.
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 8f7c4f0b4..42e6a574d 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -67963,6 +67963,32 @@ void HP_status_read_job_db(void) {
}
return;
}
+void HP_status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_read_job_db_sub_pre ) {
+ void (*preHookFunc) (int *idx, const char *name, config_setting_t *jdb);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_read_job_db_sub_pre[hIndex].func;
+ preHookFunc(&idx, name, jdb);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.read_job_db_sub(idx, name, jdb);
+ }
+ if( HPMHooks.count.HP_status_read_job_db_sub_post ) {
+ void (*postHookFunc) (int *idx, const char *name, config_setting_t *jdb);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_read_job_db_sub_post[hIndex].func;
+ postHookFunc(&idx, name, jdb);
+ }
+ }
+ return;
+}
/* storage */
void HP_storage_reconnect(void) {
int hIndex = 0;