Commit Graph

55 Commits

Author SHA1 Message Date
Marc-André Moreau
3c4bee3d95 libfreerdp-core: fix RDG valgrind issues 2015-03-17 16:54:45 -04:00
David FORT
52bd4469d9 Make handle operations static
This patch moves the handle operations in a static struct.
2015-03-16 10:31:26 +01:00
Armin Novak
02212db9cb Using new handle cleanup structure 2015-03-11 17:57:01 +01:00
Armin Novak
0daae8a2aa Using handle close callback now. 2015-03-11 15:11:00 +01:00
Armin Novak
bab7fe50a7 Prettiefied WLog messages. 2015-01-20 11:05:45 +01:00
Martin Haimberger
fa6d551676 changed processhandle handling to new system 2014-12-02 00:08:10 -08:00
Armin Novak
c304f457cf Implemented thread handling for WaitForMultipleObjects.
Implemented thread specific functions.
2014-10-27 11:23:15 +01:00
Marc-André Moreau
f6b3b24c22 winpr: add new line ending, utf16 byte order swap functions 2014-10-16 18:07:44 -04:00
Marc-André Moreau
020436db79 libwinpr-handle: fix dummy DuplicateHandle implementation 2014-10-11 12:34:45 -04:00
Armin Novak
b22b897389 Reformatted changed files. 2014-09-09 16:32:22 +02:00
Armin Novak
28ece6bb46 Replaced stdio logging with WLog 2014-09-09 16:31:46 +02:00
Norbert Federa
aac57e7e72 winpr: CloseHandle did not release the thread TCB
This resulted in huge memory leaks - 8MB per thread, depending on
the system's default stack size.
The leak happend even if CloseHandle() was correctly used to "detach"
the thread but WaitForSingleObject was never called.
2014-07-10 12:28:35 +02:00
Emmanuel Ledoux
fba58a5b90 winpr-comm: added _HandleCloseCbsLock to protect accesses to _HandleCloseCbs 2014-07-03 11:24:37 +02:00
Emmanuel Ledoux
db1fba3a68 Revert "winpr-handle: removed RegisterHandleCloseCb() which would require a better synchronization"
RegisterHandleCloseCb() is also useful to don't get a circular dependency, a better synchronization must be find out...

This reverts commit 8f3b3fa573.
2014-07-02 16:57:20 +02:00
Emmanuel Ledoux
8f3b3fa573 winpr-handle: removed RegisterHandleCloseCb() which would require a better synchronization
winpr-comm: don't use anymore RegisterHandleCloseCb()
2014-07-02 16:19:28 +02:00
Emmanuel Ledoux
9fc225ac5d Merge branch 'ports'
Conflicts:
	channels/serial/client/serial_tty.c
2014-06-30 17:22:15 +02:00
Emmanuel Ledoux
f454a5c0c8 winpr-handle: CloseHandle(), added ability to register some callback functions
winpr-comm: implemented CommCloseHandle()
2014-06-19 19:07:45 +02:00
Emmanuel Ledoux
9fc0e6eccc winpr-comm: CommReadFile and CommWriteFile are now protected by a mutex
winpr-comm: implemented IOCTL_SERIAL_IMMEDIATE_CHAR
2014-06-17 16:34:20 +02:00
Emmanuel Ledoux
85343a435a winpr-comm: completed _purge() supporting SERIAL_PURGE_RXABORT
winpr-comm: CommReadFile, support of FREERDP_PURGE_RXABORT sent by _purge()
2014-05-28 18:42:23 +02:00
Emmanuel Ledoux
4715009965 winpr-comm: completing _purge() on write operations (SERIAL_PURGE_TXABORT)
winpr-comm: CommWriteFile, implemented the WriteTotalTimeout
2014-05-28 16:41:24 +02:00
Norbert Federa
5d82ff3c5d winpr: fixed non monolithic build issue 2014-05-28 16:22:32 +02:00
Norbert Federa
aa2efaf573 winpr: rewrite named pipe sharing
Since commit 5e09e37d42 was basically unfixable,
here is a slightly different approach that should hopefully solve all
discovered issues and race conditions.
2014-05-28 13:54:08 +02:00
Emmanuel Ledoux
b8d00e41c4 - winpr-comm: fixed again the synchronization arround PendingEvents. Prefer to wait for the end of _wait_on_mask() inside _set_wait_mask() 2014-05-27 17:29:55 +02:00
Emmanuel Ledoux
1aeca8fbc7 - serial: terminates IRP threads more gracefully and avoiding warning messages. 2014-05-27 16:17:47 +02:00
Emmanuel Ledoux
b889ad7125 winpr-comm: reviewed the synchronization around counters, WaitMask and PendingEvents variables. Got rid of the semaphore PendingEventsSem. 2014-05-27 12:29:24 +02:00
Emmanuel Ledoux
9796224936 - winpr-comm: got a finalized version of IOCTL_SERIAL_WAIT_ON_MASK
- serial: cleaning up the code
2014-05-27 11:33:10 +02:00
Norbert Federa
538cc2d4a8 winpr: fixed incorrect pipe reference count usage
- refcount is only relevant for servermode
- refcount was used uninitialized in clientmode
- credit for fix goes to @bmiklautz

Bug was introduced by 5e09e37d42
2014-05-26 21:24:34 +02:00
Marc-André Moreau
06d36c7084 libwinpr-pipe: fix circular dependency 2014-05-08 17:17:39 -04:00
Emmanuel Ledoux
e7f0185e69 - firt use of winpr-comm by the serial channel (not tested and not finalized) 2014-04-27 19:41:25 +02:00
Emmanuel Ledoux
346c598bbe Introduced RegisterHandleCreator() to be used with CreateFile() 2014-04-22 17:00:14 +02:00
Mike McDonald
d8c1133201 Changes to named pipe functions based on code review. 2014-04-18 14:02:44 -04:00
Mike McDonald
5e09e37d42 Modified named pipes to support multiple instances (i.e., multiple calls to CreateNamedPipe with the same pipe name). 2014-04-18 13:16:42 -04:00
Marc-André Moreau
82ed4f0f38 libwinpr-comm: initial stubs 2014-04-02 15:51:28 -04:00
Bernhard Miklautz
d2790d92c8 winpr-handle: fixed compiler warning 2013-10-15 13:22:01 +02:00
Bernhard Miklautz
0cc918a1d5 winpr-handle: fixed mem leak when closing named pipes 2013-10-15 13:03:30 +02:00
Marc-André Moreau
4a77f12b32 libwinpr-security: expand stubs 2013-09-24 00:07:48 -04:00
Marc-André Moreau
8d142eb85f libwinpr-thread: initial CreateProcess() implementation 2013-09-22 17:23:00 -04:00
Armin Novak
e5c138a5b9 Fixed various memory leaks, allocation size issues and API misuse
warnings shown by clang as well as some compiler warnings.
2013-09-05 12:14:34 +02:00
Marc-André Moreau
007bd87ff4 libwinpr-synch: start implementing waitable timers 2013-07-29 11:57:29 -04:00
Marc-André Moreau
507899ade9 libwinpr-pipe: initial basic named pipe support 2013-07-22 23:17:08 -04:00
Marc-André Moreau
afe1f22bcf libwinpr-pipe: start implementing named pipes 2013-07-22 18:20:34 -04:00
Marc-André Moreau
c0160b8015 libwinpr-handle: reduce usage of unneeded handle management functions 2013-05-16 18:27:26 -04:00
Marc-André Moreau
72e9087d1f winpr: unify handle types 2013-05-16 17:32:58 -04:00
Marc-André Moreau
c428d1c4de libfreerdp-core: fix build on linux 2012-12-12 23:36:15 -05:00
Marc-André Moreau
7ff2be09b2 libfreerdp-core: more TSG memory cleanup 2012-12-12 22:03:40 -05:00
Marc-André Moreau
d0792ea4d1 libwinpr-synch: implement pipe-based semaphore 2012-11-28 12:47:04 -05:00
Marc-André Moreau
57d4a07af9 libfreerdp-utils: replace internal wait_obj implementation 2012-11-26 18:02:41 -05:00
Marc-André Moreau
9aa1217c4e libwinpr-pipe: implement anonymous pipes 2012-10-07 20:25:50 -04:00
Marc-André Moreau
ca6a37eed4 libwinpr-synch: implemented semaphores + thread wait 2012-09-18 19:24:03 -04:00
Marc-André Moreau
4bd217055c libwinpr-synch: implemented Win32 Events 2012-09-18 18:36:13 -04:00