Skip to content

Commit 6128ce1

Browse files
committed
HPM Hooks update
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
1 parent 7fd977c commit 6128ce1

6 files changed

Lines changed: 28 additions & 28 deletions

File tree

src/common/HPMDataCheck.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,60 +37,60 @@
3737

3838
HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
3939
#ifdef API_ACLIF_H
40-
{ "aclif_interface", sizeof(struct aclif_interface), SERVER_TYPE_UNKNOWN },
41-
{ "char_server_data", sizeof(struct char_server_data), SERVER_TYPE_UNKNOWN },
42-
{ "online_api_login_data", sizeof(struct online_api_login_data), SERVER_TYPE_UNKNOWN },
40+
{ "aclif_interface", sizeof(struct aclif_interface), SERVER_TYPE_API },
41+
{ "char_server_data", sizeof(struct char_server_data), SERVER_TYPE_API },
42+
{ "online_api_login_data", sizeof(struct online_api_login_data), SERVER_TYPE_API },
4343
#else
4444
#define API_ACLIF_H
4545
#endif // API_ACLIF_H
4646
#ifdef API_ALOGINIF_H
47-
{ "aloginif_interface", sizeof(struct aloginif_interface), SERVER_TYPE_UNKNOWN },
47+
{ "aloginif_interface", sizeof(struct aloginif_interface), SERVER_TYPE_API },
4848
#else
4949
#define API_ALOGINIF_H
5050
#endif // API_ALOGINIF_H
5151
#ifdef API_APISESSIONDATA_H
52-
{ "api_session_data", sizeof(struct api_session_data), SERVER_TYPE_UNKNOWN },
52+
{ "api_session_data", sizeof(struct api_session_data), SERVER_TYPE_API },
5353
#else
5454
#define API_APISESSIONDATA_H
5555
#endif // API_APISESSIONDATA_H
5656
#ifdef API_API_H
57-
{ "api_interface", sizeof(struct api_interface), SERVER_TYPE_UNKNOWN },
57+
{ "api_interface", sizeof(struct api_interface), SERVER_TYPE_API },
5858
#else
5959
#define API_API_H
6060
#endif // API_API_H
6161
#ifdef API_HTTPHANDLER_H
62-
{ "HttpHandler", sizeof(struct HttpHandler), SERVER_TYPE_UNKNOWN },
62+
{ "HttpHandler", sizeof(struct HttpHandler), SERVER_TYPE_API },
6363
#else
6464
#define API_HTTPHANDLER_H
6565
#endif // API_HTTPHANDLER_H
6666
#ifdef API_HTTPPARSER_H
67-
{ "httpparser_interface", sizeof(struct httpparser_interface), SERVER_TYPE_UNKNOWN },
67+
{ "httpparser_interface", sizeof(struct httpparser_interface), SERVER_TYPE_API },
6868
#else
6969
#define API_HTTPPARSER_H
7070
#endif // API_HTTPPARSER_H
7171
#ifdef API_HTTPSENDER_H
72-
{ "httpsender_interface", sizeof(struct httpsender_interface), SERVER_TYPE_UNKNOWN },
72+
{ "httpsender_interface", sizeof(struct httpsender_interface), SERVER_TYPE_API },
7373
#else
7474
#define API_HTTPSENDER_H
7575
#endif // API_HTTPSENDER_H
7676
#ifdef API_IMAGEPARSER_H
77-
{ "gif_user_data", sizeof(struct gif_user_data), SERVER_TYPE_UNKNOWN },
78-
{ "imageparser_interface", sizeof(struct imageparser_interface), SERVER_TYPE_UNKNOWN },
77+
{ "gif_user_data", sizeof(struct gif_user_data), SERVER_TYPE_API },
78+
{ "imageparser_interface", sizeof(struct imageparser_interface), SERVER_TYPE_API },
7979
#else
8080
#define API_IMAGEPARSER_H
8181
#endif // API_IMAGEPARSER_H
8282
#ifdef API_JSONPARSER_H
83-
{ "jsonparser_interface", sizeof(struct jsonparser_interface), SERVER_TYPE_UNKNOWN },
83+
{ "jsonparser_interface", sizeof(struct jsonparser_interface), SERVER_TYPE_API },
8484
#else
8585
#define API_JSONPARSER_H
8686
#endif // API_JSONPARSER_H
8787
#ifdef API_JSONWRITER_H
88-
{ "jsonwriter_interface", sizeof(struct jsonwriter_interface), SERVER_TYPE_UNKNOWN },
88+
{ "jsonwriter_interface", sizeof(struct jsonwriter_interface), SERVER_TYPE_API },
8989
#else
9090
#define API_JSONWRITER_H
9191
#endif // API_JSONWRITER_H
9292
#ifdef API_MIMEPART_H
93-
{ "MimePart", sizeof(struct MimePart), SERVER_TYPE_UNKNOWN },
93+
{ "MimePart", sizeof(struct MimePart), SERVER_TYPE_API },
9494
#else
9595
#define API_MIMEPART_H
9696
#endif // API_MIMEPART_H

src/plugins/HPMHooking/HPMHooking.Defs.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9590,8 +9590,8 @@ typedef int64 (*HPMHOOK_pre_timer_addtick) (int *tid, int64 *tick);
95909590
typedef int64 (*HPMHOOK_post_timer_addtick) (int64 retVal___, int tid, int64 tick);
95919591
typedef int64 (*HPMHOOK_pre_timer_settick) (int *tid, int64 *tick);
95929592
typedef int64 (*HPMHOOK_post_timer_settick) (int64 retVal___, int tid, int64 tick);
9593-
typedef int (*HPMHOOK_pre_timer_add_func_list) (TimerFunc *func, char **name);
9594-
typedef int (*HPMHOOK_post_timer_add_func_list) (int retVal___, TimerFunc func, char *name);
9593+
typedef int (*HPMHOOK_pre_timer_add_func_list) (TimerFunc *func, const char **name);
9594+
typedef int (*HPMHOOK_post_timer_add_func_list) (int retVal___, TimerFunc func, const char *name);
95959595
typedef unsigned long (*HPMHOOK_pre_timer_get_uptime) (void);
95969596
typedef unsigned long (*HPMHOOK_post_timer_get_uptime) (unsigned long retVal___);
95979597
typedef int (*HPMHOOK_pre_timer_perform) (int64 *tick);

src/plugins/HPMHooking/HPMHooking_api.Hooks.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13337,11 +13337,11 @@ int64 HP_timer_settick(int tid, int64 tick) {
1333713337
}
1333813338
return retVal___;
1333913339
}
13340-
int HP_timer_add_func_list(TimerFunc func, char *name) {
13340+
int HP_timer_add_func_list(TimerFunc func, const char *name) {
1334113341
int hIndex = 0;
1334213342
int retVal___ = 0;
1334313343
if (HPMHooks.count.HP_timer_add_func_list_pre > 0) {
13344-
int (*preHookFunc) (TimerFunc *func, char **name);
13344+
int (*preHookFunc) (TimerFunc *func, const char **name);
1334513345
*HPMforce_return = false;
1334613346
for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++) {
1334713347
preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func;
@@ -13356,7 +13356,7 @@ int HP_timer_add_func_list(TimerFunc func, char *name) {
1335613356
retVal___ = HPMHooks.source.timer.add_func_list(func, name);
1335713357
}
1335813358
if (HPMHooks.count.HP_timer_add_func_list_post > 0) {
13359-
int (*postHookFunc) (int retVal___, TimerFunc func, char *name);
13359+
int (*postHookFunc) (int retVal___, TimerFunc func, const char *name);
1336013360
for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++) {
1336113361
postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func;
1336213362
retVal___ = postHookFunc(retVal___, func, name);

src/plugins/HPMHooking/HPMHooking_char.Hooks.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23461,11 +23461,11 @@ int64 HP_timer_settick(int tid, int64 tick) {
2346123461
}
2346223462
return retVal___;
2346323463
}
23464-
int HP_timer_add_func_list(TimerFunc func, char *name) {
23464+
int HP_timer_add_func_list(TimerFunc func, const char *name) {
2346523465
int hIndex = 0;
2346623466
int retVal___ = 0;
2346723467
if (HPMHooks.count.HP_timer_add_func_list_pre > 0) {
23468-
int (*preHookFunc) (TimerFunc *func, char **name);
23468+
int (*preHookFunc) (TimerFunc *func, const char **name);
2346923469
*HPMforce_return = false;
2347023470
for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++) {
2347123471
preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func;
@@ -23480,7 +23480,7 @@ int HP_timer_add_func_list(TimerFunc func, char *name) {
2348023480
retVal___ = HPMHooks.source.timer.add_func_list(func, name);
2348123481
}
2348223482
if (HPMHooks.count.HP_timer_add_func_list_post > 0) {
23483-
int (*postHookFunc) (int retVal___, TimerFunc func, char *name);
23483+
int (*postHookFunc) (int retVal___, TimerFunc func, const char *name);
2348423484
for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++) {
2348523485
postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func;
2348623486
retVal___ = postHookFunc(retVal___, func, name);

src/plugins/HPMHooking/HPMHooking_login.Hooks.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12001,11 +12001,11 @@ int64 HP_timer_settick(int tid, int64 tick) {
1200112001
}
1200212002
return retVal___;
1200312003
}
12004-
int HP_timer_add_func_list(TimerFunc func, char *name) {
12004+
int HP_timer_add_func_list(TimerFunc func, const char *name) {
1200512005
int hIndex = 0;
1200612006
int retVal___ = 0;
1200712007
if (HPMHooks.count.HP_timer_add_func_list_pre > 0) {
12008-
int (*preHookFunc) (TimerFunc *func, char **name);
12008+
int (*preHookFunc) (TimerFunc *func, const char **name);
1200912009
*HPMforce_return = false;
1201012010
for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++) {
1201112011
preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func;
@@ -12020,7 +12020,7 @@ int HP_timer_add_func_list(TimerFunc func, char *name) {
1202012020
retVal___ = HPMHooks.source.timer.add_func_list(func, name);
1202112021
}
1202212022
if (HPMHooks.count.HP_timer_add_func_list_post > 0) {
12023-
int (*postHookFunc) (int retVal___, TimerFunc func, char *name);
12023+
int (*postHookFunc) (int retVal___, TimerFunc func, const char *name);
1202412024
for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++) {
1202512025
postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func;
1202612026
retVal___ = postHookFunc(retVal___, func, name);

src/plugins/HPMHooking/HPMHooking_map.Hooks.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100134,11 +100134,11 @@ int64 HP_timer_settick(int tid, int64 tick) {
100134100134
}
100135100135
return retVal___;
100136100136
}
100137-
int HP_timer_add_func_list(TimerFunc func, char *name) {
100137+
int HP_timer_add_func_list(TimerFunc func, const char *name) {
100138100138
int hIndex = 0;
100139100139
int retVal___ = 0;
100140100140
if (HPMHooks.count.HP_timer_add_func_list_pre > 0) {
100141-
int (*preHookFunc) (TimerFunc *func, char **name);
100141+
int (*preHookFunc) (TimerFunc *func, const char **name);
100142100142
*HPMforce_return = false;
100143100143
for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++) {
100144100144
preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func;
@@ -100153,7 +100153,7 @@ int HP_timer_add_func_list(TimerFunc func, char *name) {
100153100153
retVal___ = HPMHooks.source.timer.add_func_list(func, name);
100154100154
}
100155100155
if (HPMHooks.count.HP_timer_add_func_list_post > 0) {
100156-
int (*postHookFunc) (int retVal___, TimerFunc func, char *name);
100156+
int (*postHookFunc) (int retVal___, TimerFunc func, const char *name);
100157100157
for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++) {
100158100158
postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func;
100159100159
retVal___ = postHookFunc(retVal___, func, name);

0 commit comments

Comments
 (0)