Bernhard Miklautz
68e8569110
winpr/synch: remove the dependency on winsock.h
...
winsock.h pulls in a lot of defines and dependencies that are not
required and partially unwanted in winpr's core (for parts that are not
related to network). In order to get rid of this dependency and have an
independent defines for extended winpr functions the WINPR_FD_* defines
are used internally (and for exposed functions). Where required, like in
WSAEventSelect, the FD_* is mapped to WINPR_FD_*.
2015-07-14 11:39:41 +02:00
Armin Novak
d18b0fbeb4
Handle API updated.
2015-07-03 09:52:52 +02:00
Bernhard Miklautz
bf73f4e4f1
Fix unchecked strdups
...
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Armin Novak
db7753bc8b
Added RemoveDirectoryA, clean up test directories.
2015-06-09 13:16:28 +02:00
Norbert Federa
1eff1a345e
free can handle NULL perfectly fine
2015-05-11 09:07:39 +02:00
Bernhard Miklautz
850de59b55
winpr: add checks for *alloc
...
Add missing checks if memory allocation was successful. Also adapt
caller(s) when possible.
2015-04-08 11:34:37 +02:00
Armin Novak
afe8bd2a86
Fixed missing checks for invalid handle.
2015-03-31 15:18:45 +02:00
Bernhard Miklautz
1d7b3694a9
Integrate feedback from pull request ( #2492 )
...
* shell: add missing NULL checks
* thread: handle case where HAVE_EVENTFD_H isn't defined
* wlog: return NULL instead of 0
* wlog: use g_RootLog instead of WLog_GetRoot
otherwise a new root might be initialized on uninit
* indentation and style fixes
2015-03-25 17:38:21 +01:00
Bernhard Miklautz
3c7662517c
hardening
...
Start to add missing checks for:
* *alloc
* *_New
2015-03-25 17:38:21 +01:00
David FORT
552df08926
Implement ReadFile() and WriteFile() as handle operation
2015-03-16 21:29:19 +01: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
4fda6b1e5a
Using new handle cleanup structure
2015-03-11 17:57:01 +01:00
Armin Novak
8848d1d1fa
Using handle close callback now.
2015-03-11 15:10:52 +01:00
Armin Novak
cd1782efaa
Fixed NULL pointer dereference.
2014-11-16 16:47:38 +01:00
Armin Novak
b22b897389
Reformatted changed files.
2014-09-09 16:32:22 +02:00
Armin Novak
7e3a1b3073
Now using macro to generate module specific log tag.
2014-09-09 16:32:04 +02:00
Armin Novak
28ece6bb46
Replaced stdio logging with WLog
2014-09-09 16:31:46 +02:00
Bernhard Miklautz
6a49bcfe40
winpr: always build "monolitic"
...
winpr is now always build as single library.
The build option MONOLITHIC_BUILD doesn't influence this behavior anymore.
The only exception is winpr-makecert-tool which is still build as extra
library.
This obsoletes complex_libraries for winpr.
2014-07-10 11:10:58 +02:00
Emmanuel Ledoux
87ce88370a
winpr-comm: added _HandleCreatorsLock to protect accesses to _HandleCreators
2014-07-03 11:20:46 +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
d38a323526
winpr-comm, winpr-file: better initialization of the static variables
2014-06-19 12:03:36 +02:00
Hardening
9039a23de3
Silently handle EINTR and retry operation
2014-06-18 22:09:07 +02:00
Hardening
b4d756830a
Don't forget to SetLastError() on disconnection
...
Otherwise if the last error was a ERROR_NO_DATA we have no indication that
the pipe has been closed.
2014-06-12 23:09:49 +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
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
Bernhard Miklautz
e5fb854a49
winpr-file: harden GetNamePipeFileDescriptor
...
Ensure that GetNamePipeFileDescriptor returns an error
if the supplied handle isn't a named pipe.
2014-05-07 21:23:54 +02:00
Bernhard Miklautz
b817e92e5e
cmake: mark required libraries for export
2014-04-23 10:16:02 +02:00
Emmanuel Ledoux
346c598bbe
Introduced RegisterHandleCreator() to be used with CreateFile()
2014-04-22 17:00:14 +02:00
Emmanuel Ledoux
7e44488e0a
winpr-file: introduced HANDLE_CREATOR type
...
winpr-comm: got a _CommHandleCreator
2014-04-18 19:25:25 +02:00
Emmanuel Ledoux
f9fc107c20
new functions: DefineCommDevice / QueryCommDevice / IsCommDevice
2014-04-18 17:18:08 +02:00
Marc-André Moreau
82ed4f0f38
libwinpr-comm: initial stubs
2014-04-02 15:51:28 -04:00
Martin Haimberger
3808705652
WriteFile and ReadFile does not check for INVALID_HANDLE_VALUE
2014-03-11 06:34:41 -07:00
Marc-André Moreau
315885c1eb
libwinpr-file: fix improper status code in overlapped i/o
2014-02-28 11:24:44 -05:00
Marc-André Moreau
1697469ced
libwinpr-file: implement further AIO-based overlapped I/O
2014-02-17 13:02:39 -05:00
Hardening
569ca5b62e
Fix the behaviour ReadFile() and WriteFile() in non-blocking mode
...
These functions were not returning the correct values when treating
non-blocking file descriptor.
2014-02-07 15:19:46 +01:00
Marc-André Moreau
55565e056c
freerdp: export targets
2013-10-28 23:06:39 -04:00
Bernhard Miklautz
96e267fcdf
winpr-file: fixed memory leak in error case
2013-10-15 13:22:34 +02:00
Marc-André Moreau
0569de167d
libwinpr-utils: further split wlog framework into more source files, add some thread safety for write operations
2013-10-02 13:38:21 -04:00
Marc-André Moreau
8695c5226b
libwinpr-file: added more error checking
2013-10-01 12:03:08 -04:00
Marc-André Moreau
480071cdeb
libwinpr-io: improve overlapped io with server-side named pipes
2013-09-25 23:16:33 -04:00
Marc-André Moreau
f4e98f29ec
libwinpr-pipe: add server-side named pipe waiting
2013-09-25 19:13:39 -04:00
Marc-André Moreau
518995a05e
freerdp: merge with master
2013-09-16 17:10:27 -04:00
Armin Novak
cf20efb4c6
Simplified code for FindFirstFileA, now always using FindClose
...
for cleanup.
2013-09-05 12:14:35 +02:00
Armin Novak
4331fa1f8b
Fixed invalid API usage, ...
2013-09-05 12:14:34 +02:00
Armin Novak
a3b531c036
Fixed issues found with clang-analyzer
2013-09-05 12:14:33 +02:00
Armin Novak
53e0d53b99
Fixed coverity issue 1047603
2013-09-05 12:14:32 +02:00
Bernhard Miklautz
90c2cb22ab
winpr: fixed test building
2013-08-29 09:44:41 +02:00
Marc-André Moreau
8423fccbc2
libwinpr-pipe: add support for overlapped i/o with named pipes (synchronous, compatible implementation)
2013-08-22 22:36:37 -04:00
Alessandro Pilotti
644e0efa76
Fixes libwinpr build issue on Windows
...
Adds conditional statements in file.c to solve a Posix portability
issue on Windows introduced with the following commit:
913d532e0d
2013-08-09 02:45:31 +03:00
Marc-André Moreau
913d532e0d
winpr: fix build on Linux
2013-07-30 10:57:54 -04:00
Marc-André Moreau
507899ade9
libwinpr-pipe: initial basic named pipe support
2013-07-22 23:17:08 -04:00
Marc-André Moreau
65bc944def
libwinpr-pipe: implement of more named pipes
2013-07-22 22:53:44 -04:00
Marc-André Moreau
afe1f22bcf
libwinpr-pipe: start implementing named pipes
2013-07-22 18:20:34 -04:00
Marc-André Moreau
72e9087d1f
winpr: unify handle types
2013-05-16 17:32:58 -04:00
Hardening
7701c9d934
Replace printf(...) by fprintf(stderr, ...)
2013-03-28 23:06:34 +01:00
Marc-André Moreau
068f0de4d4
libfreerdp-utils: purge old file utils
2013-03-22 15:52:43 -04:00
Bernhard Miklautz
e8eb0d0b44
Fixed formating build warnings (-Wformat)
2013-03-15 20:03:48 +01:00
Marc-André Moreau
6b2db2d103
macosx: update client
2012-11-22 15:32:21 -05:00
Marc-André Moreau
1c4a587ef1
windows: fix build
2012-11-11 17:23:57 -05:00
Marc-André Moreau
b3f6dea390
libfreerdp-client: started addin enumerator
2012-11-03 23:04:04 -04:00
Marc-André Moreau
cd52a5b0b2
libwinpr-file: get FindFirstFile, FindNextFile working
2012-11-03 18:31:01 -04:00
Marc-André Moreau
9f5917682f
libwinpr-file: fix X* and X? pattern matching cases
2012-11-03 17:24:52 -04:00
Marc-André Moreau
cc90fd1955
libwinpr-file: implement recursive pattern matching
2012-11-03 16:45:19 -04:00
Marc-André Moreau
1ff1d4ce49
libwinpr-file: partially implement proper pattern matching
2012-11-03 15:13:13 -04:00
Marc-André Moreau
7a316d8db7
libwinpr-file: make simplest FindFirstFile test case pass
2012-11-02 20:58:58 -04:00
Marc-André Moreau
d251538252
libwinpr: fix build on linux
2012-10-18 22:05:06 -04:00
Marc-André Moreau
2f1711c506
libwinpr-path: make tests pass on Windows
2012-10-18 21:11:12 -04:00
Marc-André Moreau
1ee21f558e
libwinpr: fix build of tests on Windows
2012-10-18 17:30:57 -04:00
Marc-André Moreau
d5b635c9e8
libwinpr-library: improve library tests
2012-10-18 16:58:27 -04:00
Marc-André Moreau
dd23dd1aee
ctest: change default output test path
2012-10-18 15:37:00 -04:00
Marc-André Moreau
229438dbf3
cmake: fix monolithic test build
2012-10-13 17:38:02 -04:00
Marc-André Moreau
06fa85f31c
cmake: refactoring of MONOLITHIC_BUILD
2012-10-13 17:30:59 -04:00
Marc-André Moreau
2ee9f23a8e
cmake: revert back to standard CTest BUILD_TESTING option
2012-10-13 09:50:02 -04:00
Marc-André Moreau
c26a623ed1
cmake: rename BUILD_TESTING to TEST_BUILD
2012-10-12 16:04:46 -04:00
Marc-André Moreau
b97b40a91e
wfreerdp: fix build on Windows
2012-10-10 19:11:36 -04:00
Marc-André Moreau
40eea7c76b
cmake: rename WITH_MONOLITHIC_BUILD to MONOLITHIC_BUILD
2012-10-08 22:55:06 -04:00
Marc-André Moreau
9aa1217c4e
libwinpr-pipe: implement anonymous pipes
2012-10-07 20:25:50 -04:00
Marc-André Moreau
bf26079d3f
libwinpr: added tests and fix InterlockedCompareExchange64 on Windows XP
2012-10-04 18:57:32 -04:00
Marc-André Moreau
fcc9f91302
cmake: add support for solution groups
2012-09-30 22:58:59 -04:00
Marc-André Moreau
0df7bcf632
libwinpr-file: added CreateFile/DeleteFile
2012-09-26 16:25:23 -04:00
Marc-André Moreau
089312abb0
libwinpr-error: stub error API
2012-09-26 12:37:35 -04:00
Marc-André Moreau
75f7f78af1
libwinpr: add stubs for io and file modules
2012-09-24 15:58:33 -04:00