mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
begin rework for js tests and hook examples
This commit is contained in:
18
hook/examples/accept/accept.c
Normal file
18
hook/examples/accept/accept.c
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* This hook just accepts any transaction coming through it
|
||||
*/
|
||||
#include "../hookapi.h"
|
||||
|
||||
int64_t cbak(uint32_t reserved) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t hook(uint32_t reserved ) {
|
||||
|
||||
TRACESTR("Accept.c: Called.");
|
||||
accept (0,0,0);
|
||||
|
||||
_g(1,1); // every hook needs to import guard function and use it at least once
|
||||
// unreachable
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user