Driver: Add debug output about callbacks proxying

This commit is contained in:
Nodir Temirkhodjaev 2021-12-14 15:50:57 +03:00
parent e05de076f2
commit d195a3d400
2 changed files with 10 additions and 3 deletions

View File

@ -11,8 +11,13 @@ FORT_API FortCallbackFunc fort_callback(int id, FortCallbackFunc func)
if (g_callbackInfo.src == NULL) if (g_callbackInfo.src == NULL)
return func; return func;
ProxyCallbackProc cb = g_callbackInfo.src[id];
DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL,
"FORT: Proxy Callback: i=%d func=%p cb=%p\n", id, func, cb);
g_callbackInfo.callbacks[id] = func; g_callbackInfo.callbacks[id] = func;
return g_callbackInfo.src[id]; return cb;
} }
FORT_API void fort_callback_setup(PFORT_PROXYCB_INFO cb_info) FORT_API void fort_callback_setup(PFORT_PROXYCB_INFO cb_info)

View File

@ -81,10 +81,12 @@ FORT_API void fort_proxycb_drv_setup(PDRIVER_DISPATCH *driver_major_funcs)
PDRIVER_DISPATCH major_func = driver_major_funcs[i]; PDRIVER_DISPATCH major_func = driver_major_funcs[i];
if (major_func != g_proxyDrvCallbacksArray[i]) { if (major_func != g_proxyDrvCallbacksArray[i]) {
g_proxyDrvCallbacksArray[i] = major_func; g_proxyDrvCallbacksArray[i] = major_func;
driver_major_funcs[i] = g_proxyMajorCallbacks[i];
PDRIVER_DISPATCH cb = g_proxyMajorCallbacks[i];
driver_major_funcs[i] = cb;
DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL,
"FORT: Proxy Major: i=%d func=%p\n", i, major_func); "FORT: Proxy Major: i=%d func=%p cb=%p\n", i, major_func, cb);
} }
} }
} }