aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/hook_lib/file_hook.c')
-rw-r--r--src/hook_lib/file_hook.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hook_lib/file_hook.c b/src/hook_lib/file_hook.c
index 5630581..728ab4e 100644
--- a/src/hook_lib/file_hook.c
+++ b/src/hook_lib/file_hook.c
@@ -237,6 +237,9 @@ void _fini() {
* Format of log string: time event filename stage result/err
*/
static int __raw_log_event(const char *event_type, const char *filename, char *result,int err, char* stage) {
+ if(! is_initialized) // it is essential to initialize hooks because we are
+ __init_hooks(); // using _snprintf here
+
char msg_buff[MAXSOCKETMSGLEN];
int bytes_to_send;
if(strcmp(result,"ERR")==0) {