diff --git a/src/daemon/toks_daemon_loop.c b/src/daemon/toks_daemon_loop.c index d038982..22aa770 100644 --- a/src/daemon/toks_daemon_loop.c +++ b/src/daemon/toks_daemon_loop.c @@ -70,8 +70,7 @@ int32_t __stdcall toks_daemon_loop(void * ctx) do { if (svcvtbl == toks_daemon_vtbl) toks_log_lpc_request( - dctx->driver_ctx, - request); + dctx,request); switch (request->header.msg_type) { case NT_LPC_REQUEST: diff --git a/src/internal/toksvc_log_impl.h b/src/internal/toksvc_log_impl.h index 38b0492..dcbe78f 100644 --- a/src/internal/toksvc_log_impl.h +++ b/src/internal/toksvc_log_impl.h @@ -26,6 +26,8 @@ enum toks_log_entry_type { TOKS_LOG_ENTRY_SUB_LEVEL_6, }; +struct toks_daemon_ctx; + const char * toks_log_basename(const char * path); void toks_log_header( @@ -47,7 +49,7 @@ void toks_log_get_arbitrary_process_name( nt_cid *, char *, size_t); void toks_log_lpc_request( - const struct toks_driver_ctx *, + struct toks_daemon_ctx *, const nt_tty_port_msg *); #endif diff --git a/src/log/toks_log_lpc_request.c b/src/log/toks_log_lpc_request.c index d4508e6..380a029 100644 --- a/src/log/toks_log_lpc_request.c +++ b/src/log/toks_log_lpc_request.c @@ -9,13 +9,16 @@ #include #include "toksvc_driver_impl.h" +#include "toksvc_daemon_impl.h" #include "toksvc_log_impl.h" void toks_log_lpc_request( - const struct toks_driver_ctx * dctx, + struct toks_daemon_ctx * dctx, const nt_tty_port_msg * msg) { - TOKS_LOG_LEVEL(dctx,0); + struct toks_driver_ctx * drvctx = dctx->driver_ctx; + + TOKS_LOG_LEVEL(drvctx,0); nt_cid cid; char path[2048]; @@ -27,7 +30,7 @@ void toks_log_lpc_request( &cid,path,sizeof(path)); toks_log_header( - dctx, + drvctx, TOKS_LOG_ENTRY_SERVER_INFO, "LPC request from %s (syspid %d, systid %d), " "data_size=%u, msg_size=%u, " @@ -42,7 +45,7 @@ void toks_log_lpc_request( if (cid.process_id) toks_log_write( - dctx, + drvctx, TOKS_LOG_ENTRY_SUB_LEVEL_2, "%s.\n",path); }