Skip to content

Commit 24c3cfc

Browse files
committed
dispatcher -> dispatchers
1 parent e44c1ca commit 24c3cfc

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/main.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ class device_dispatch_invoker {
2727
static status invoke(PDEVICE_OBJECT device_object, PIRP irp) noexcept {
2828
NTSTATUS status = STATUS_INVALID_DEVICE_REQUEST;
2929
irp->IoStatus.Information = 0;
30-
auto dispatcher = this_driver->dispatchers(device_object);
31-
if (dispatcher) {
30+
auto dispatchers = this_driver->dispatchers(device_object);
31+
if (dispatchers) {
3232
PIO_STACK_LOCATION irp_sp = IoGetCurrentIrpStackLocation(irp);
3333
switch (irp_sp->MajorFunction) {
3434
case IRP_MJ_CREATE:
3535
case IRP_MJ_CLOSE:
36-
if (dispatcher->on_device_control)
36+
if (dispatchers->on_device_control)
3737
status = STATUS_SUCCESS;
3838
break;
3939
case IRP_MJ_DEVICE_CONTROL:
40-
if (dispatcher->on_device_control) {
40+
if (dispatchers->on_device_control) {
4141
auto ret = ntl::seh::try_except([&]() {
4242
const void *in_buf_ptr;
4343
void *out_buf_ptr;
@@ -73,17 +73,15 @@ class device_dispatch_invoker {
7373
"Invalid control code method");
7474
break;
7575
}
76-
7776
device_control::code code(
7877
irp_sp->Parameters.DeviceIoControl.IoControlCode);
7978
device_control::in_buffer in_buf(
8079
in_buf_ptr,
8180
irp_sp->Parameters.DeviceIoControl.InputBufferLength);
8281
device_control::out_buffer out_buf(out_buf_ptr, out_len);
83-
dispatcher->on_device_control(code, in_buf, out_buf);
82+
dispatchers->on_device_control(code, in_buf, out_buf);
8483
status = STATUS_SUCCESS;
8584
irp->IoStatus.Information = (ULONG_PTR)out_buf.size;
86-
8785
} catch (const ntl::exception &e) {
8886
status = e.get_status();
8987
irp->IoStatus.Information = 0;

0 commit comments

Comments
 (0)