Working on reboot statistics

FossilOrigin-Name: 134a5b893fbd0a7a240b1a60113a3f071ae7ce83811392a87f4abd782cf3070c
This commit is contained in:
7u83@mail.ru
2016-03-11 17:16:13 +00:00
parent 8f1d79a41a
commit 5fc5523ccc
7 changed files with 98 additions and 8 deletions

View File

@ -61,6 +61,23 @@ int setup_conf(struct conn * conn)
mbag_set_byte(conn->config,CW_ITEM_ECN_SUPPORT,get_ecn_support());
n = mbag_get(conn->config,CW_ITEM_WTP_REBOOT_STATISTICS);
if (!n){
mbag_t rs =mbag_create();
mbag_set_mbag(conn->config, CW_ITEM_WTP_REBOOT_STATISTICS,rs);
mbag_set_dword(rs,CW_ITEM_REBOOT_COUNT,0);
mbag_set_dword(rs,CW_ITEM_REBOOT_AC_INITIATED_COUNT,0);
mbag_set_dword(rs,CW_ITEM_REBOOT_LINK_FAILURE_COUNT,0);
mbag_set_dword(rs,CW_ITEM_REBOOT_SW_FAILURE_COUNT,0);
mbag_set_dword(rs,CW_ITEM_REBOOT_HW_FAILURE_COUNT,0);
mbag_set_dword(rs,CW_ITEM_REBOOT_OTHER_FAILURE_COUNT,0);
mbag_set_dword(rs,CW_ITEM_REBOOT_UNKNOWN_FAILURE_COUNT,0);
mbag_set_dword(rs,CW_ITEM_REBOOT_LAST_FAILURE_TYPE, CW_REBOOT_TYPE_NOT_SUPPORTED);
}
return 0;
}