/****************************************************************************** © Copyright 2006 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. ******************************************************************************* FACILITY: Reliable Transaction Router Application template to manage group partition failover AUTHOR: Hewlett-Packard development company ******************************************************************************/ # define Max_Fac_Size 200 # define Max_Part_Size 200 # define Max_Group_Size 200 # define Max_Getline_Size 1024 # define Max_State_Size 50 # define Max_Process_Count 200 # define Max_Start_Script_Name 200 # define Max_ProcId_Size 20 /* Debug Macro definitions */ #ifdef __VMS # define dumplog_p0(fmt) {\ char mod_name[100]; \ memset(mod_name,'\0',100); \ Modname_Extractor(mod_name); \ printf("\n%s:%u:%s() " fmt"\n", mod_name, __LINE__,__func__); \ } # define dumplog_p1(fmt,x1) {\ char mod_name[100]; \ memset(mod_name,'\0',100); \ Modname_Extractor(mod_name); \ printf("\n%s:%u:%s() " fmt"\n", mod_name, __LINE__,__func__,x1); \ } # define dumplog_p2(fmt,x1,x2) {\ char mod_name[100]; \ memset(mod_name,'\0',100); \ Modname_Extractor(mod_name); \ printf("\n%s:%u:%s() " fmt"\n", mod_name, __LINE__,__func__,x1,x2); \ } # define dumplog_p3(fmt,x1,x2,x3) {\ char mod_name[100]; \ memset(mod_name,'\0',100); \ Modname_Extractor(mod_name); \ printf("\n%s:%u:%s() " fmt"\n", mod_name, __LINE__,__func__,x1,x2,x3); \ } # define dumplog_p4(fmt,x1,x2,x3,x4) {\ char mod_name[100]; \ memset(mod_name,'\0',100); \ Modname_Extractor(mod_name); \ printf("\n%s:%u:%s() " fmt"\n", mod_name, __LINE__,__func__,x1,x2,x3,x4); \ } # define dumplog_p5(fmt,x1,x2,x3,x4,x5) {\ char mod_name[100]; \ memset(mod_name,'\0',100); \ Modname_Extractor(mod_name); \ printf("\n%s:%u:%s() " fmt"\n", mod_name, __LINE__,__func__,x1,x2,x3,x4,x5); \ } # define dumplog_p6(fmt,x1,x2,x3,x4,x5,x6) {\ char mod_name[100]; \ memset(mod_name,'\0',100); \ Modname_Extractor(mod_name); \ printf("\n%s:%u:%s() " fmt"\n", mod_name, __LINE__,__func__,x1,x2,x3,x4,x5,x6); \ } # else # define dumplog_p0(fmt) printf("\n%s:%u:%s() " fmt"\n", __FILE__, __LINE__,__FUNCTION__) # define dumplog_p1(fmt,x1) printf("\n%s:%u:%s() " fmt"\n", __FILE__, __LINE__,__FUNCTION__,x1) # define dumplog_p2(fmt,x1,x2) printf("\n%s:%u:%s() " fmt"\n", __FILE__, __LINE__,__FUNCTION__,x1,x2) # define dumplog_p3(fmt,x1,x2,x3) printf("\n%s:%u:%s() " fmt"\n", __FILE__, __LINE__,__FUNCTION__,x1,x2,x3) # define dumplog_p4(fmt,x1,x2,x3,x4) printf("\n%s:%u:%s() " fmt"\n", __FILE__, __LINE__,__FUNCTION__,x1,x2,x3,x4) # define dumplog_p5(fmt,x1,x2,x3,x4,x5) printf("\n%s:%u:%s() " fmt"\n", __FILE__, __LINE__,__FUNCTION__,x1,x2,x3,x4,x5) # define dumplog_p6(fmt,x1,x2,x3,x4,x5,x6) printf("\n%s:%u:%s() " fmt"\n", __FILE__, __LINE__,__FUNCTION__,x1,x2,x3,x4,x5,x6) # endif long process_id[Max_Process_Count]; int get_table_flag; int debug; struct start_procedure_info { char group_name[Max_Group_Size]; char partition_name[Max_Part_Size]; char start_script_name[Max_Start_Script_Name]; struct start_procedure_info *pNext; }; struct Kill_Server_Proc_Flag { char group_name[Max_Group_Size]; int Kill_Active_Standby; struct Kill_Server_Proc_Flag *pNext; }; struct input_group_info { char facility_name[Max_Fac_Size]; char partition_name[Max_Part_Size]; char group_name[Max_Group_Size]; struct input_group_info *pNext; }; struct current_group_info { char facility_name[Max_Fac_Size]; char partition_name[Max_Part_Size]; char group_name[Max_Group_Size]; char partition_state[Max_State_Size]; long partition_id; int ASFlag; int DirtyGrFlag; struct current_group_info *pNext; }; struct server_process_info { char facility_name[Max_Fac_Size]; long partition_id; char server_proc_id[Max_ProcId_Size]; struct server_process_info *pNext; }; typedef struct input_group_info GROUP_INFO; GROUP_INFO *Head, *Tail; GROUP_INFO *group_info_table; typedef struct current_group_info CURRENT_GROUP_INFO; CURRENT_GROUP_INFO *Current_Gr_Head, *Current_Gr_Tail; typedef struct server_process_info SERVER_PROC_INFO; SERVER_PROC_INFO *Ser_Proc_Head,*Ser_Proc_Tail; typedef struct Kill_Server_Proc_Flag KILL_PROC_FLAG; KILL_PROC_FLAG *Kill_Flag_Head, *Kill_Flag_Tail; typedef struct start_procedure_info START_PROC_INFO; START_PROC_INFO *Start_Script_Head,*Start_Script_Tail;