projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d416ff
)
Fixed thread handling.
author
Armin Novak
<anovak@thinstuff.com>
Thu, 5 Sep 2013 11:38:56 +0000
(13:38 +0200)
committer
Armin Novak
<anovak@thinstuff.com>
Thu, 5 Sep 2013 11:38:56 +0000
(13:38 +0200)
channels/printer/client/printer_main.c
patch
|
blob
|
history
diff --git
a/channels/printer/client/printer_main.c
b/channels/printer/client/printer_main.c
index
3826b7c
..
b3b17fb
100644
(file)
--- a/
channels/printer/client/printer_main.c
+++ b/
channels/printer/client/printer_main.c
@@
-200,6
+200,8
@@
static void* printer_thread_func(void* arg)
printer_process_irp(printer_dev, irp);
}
+ ExitThread(0);
+
return NULL;
}
@@
-219,11
+221,14
@@
static void printer_free(DEVICE* device)
SetEvent(printer_dev->stopEvent);
WaitForSingleObject(printer_dev->thread, INFINITE);
- CloseHandle(printer_dev->thread);
while ((irp = (IRP*) InterlockedPopEntrySList(printer_dev->pIrpList)) != NULL)
irp->Discard(irp);
+ CloseHandle(printer_dev->thread);
+ CloseHandle(printer_dev->stopEvent);
+ CloseHandle(printer_dev->event);
+
_aligned_free(printer_dev->pIrpList);
if (printer_dev->printer)