Armin Novak
4f7a3762ae
[winpr] fix cast warnings
2023-07-28 13:42:12 +02:00
akallabeth
516668d02b
[fclose] ensure no invalid pointers are passed.
...
fclose has undefined behaviour for NULL pointers, so check for these.
2023-04-28 07:39:35 +02:00
Armin Novak
d879d87610
Use static wStream for packet logger
2022-10-10 15:29:45 +02:00
Armin Novak
6ed50b4b1d
Refactored WinPR includes
2022-03-03 11:26:48 +01:00
akallabeth
8cc6582044
Unify struct definitions ( #7633 )
...
* Unified enum/struct definitions, fixed include issues
* Fixed mac compilation issues
* Added missing include
* Fixed windows server build warnings
* Fixed VS2010 build issue
* Removed unnecessary library linking
* Fixed ThreadPool WinXP compatibility
* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak
2e0d1cc33c
Fixed integer warnings, fixed data types
2021-06-17 10:35:22 +02:00
Armin Novak
1af7ef2f1b
Fixed compilation warnings and typos
2021-06-16 15:21:56 +02:00
Marc-André Moreau
eb6777ea69
Fix Windows Unicode file path handling issues (+add winpr_fopen wrapper)
2021-05-26 08:40:29 +02:00
Armin Novak
72ca88f49c
Reformatted to new style
2019-11-07 10:53:54 +01:00
Bernhard Miklautz
52fbfb7b12
fix clang warnings, directly include wtypes.h ( #4097 )
...
* build: clang use -Wno-unused-command-line-argument
With clang 5.0 builds are quite noisy otherwise.
* Directly include wtypes.h
Directly include winpr/wtypes.h where _fseeki64 or _ftelli64 is used.
* fix build warnings with clang 5
clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning: parentheses-equality
* fix build warnings with clang 5
clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning: tautological-compare
* fix build warnings with clang 5
clang version: 5.0.0-svn310678-1~exp1 (branches/release_50)
Warning:
incompatible pointer types passing 'size_t *' (aka 'unsigned
long *') to parameter of type 'UINT32 *' (aka 'unsigned int *')
[-Wincompatible-pointer-types]
2017-08-29 09:09:38 +02:00
Armin Novak
c3d4b7d262
fseeko and ftello for 64bit file support.
2017-08-14 08:42:49 +02:00
Bernhard Miklautz
07417599ce
wlog: rework, cleanup and stabilize API
...
* only expose necessary functions and types in header
* don't expose appender internals
* add generic function WLog_ConfigureAppender to have the possibility
to configure appender specific settings
* detect appender availability if WLog_SetLogAppenderType or
WLog_Appender_New return FALSE or NULL respectively the appender isn't
available or the initialization failed. This is very useful for the
use with optional appenders.
* add Free to the appender interface. At the time of the Free the
appender is known and available so it can be called directly (instead
of calling the right function according to the type)
* make all appender internal function static
* all appenders return the generic wLogAppender type now. Typecasts
are internally done where necessary this abstracts the appenders more
cleanly
2015-11-09 18:25:45 +01:00
Martin Haimberger
b2398b3a9a
wlog: fixed return values
...
wlog used to return an int but the only meaning
of the return value was:
* negative ... error
* 0 or positive ... success
but the positve returned value was 1 or some id of some
subsystem, nothing meaningful for the caller.
For a more meaningful returnvalue we now use BOOL.
If something goes wrong FALSE is returned.
2015-10-21 01:11:06 -07:00
Armin Novak
cb7927756d
Fixed resource leak.
2015-09-01 11:31:12 +02:00
Bernhard Miklautz
1cee185e3c
hardening: check fread and fwrite return values
2015-06-26 20:38:30 +02:00
Bernhard Miklautz
06502e6a91
misc: integrate pull request feedback
2015-06-22 19:24:30 +02:00
David FORT
16d36e3083
A malloc() pass on WinPR
...
This patch treats remaining non-checked mallocs. And changes to calloc in places
where it makes sense
2015-06-22 19:10:00 +02:00
Martin Haimberger
951a2d2210
stream: check stream_new in winpr and libfreerdp
...
also fixed a few things
2015-05-29 04:46:50 -07: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
b22b897389
Reformatted changed files.
2014-09-09 16:32:22 +02:00
Armin Novak
3e21e570b8
Added recursion detection to WLog.
...
Dump functions now expect TAG and level as arguments.
2014-09-09 16:31:46 +02:00
Armin Novak
77ae3bc8b3
Fixed missing argument checks in logger, fixed crashes if file not created.
2014-08-14 10:38:02 +02:00
Marc-André Moreau
cdcd290c44
wfreerdp: fix most build warnings
2014-02-10 22:12:13 -05:00
Marc-André Moreau
3d7d4c50db
libwinpr-utils: fix IPv4 checksum and TCP sequence numbers with wlog packet messages
2013-10-09 16:37:45 -04:00
Marc-André Moreau
90b90ad496
libwinpr-utils: improve quality of data for reconstructed IP headers
2013-10-09 15:11:56 -04:00
Marc-André Moreau
7bdb63ad89
libwinpr-utils: initial wlog packet header reconstruction
2013-10-09 14:23:38 -04:00
Marc-André Moreau
166e3fbf2d
libwinpr-utils: start reconstructing IP headers for wlog packet message
2013-10-09 13:37:53 -04:00
Marc-André Moreau
684db03578
libwinpr-utils: start implement wlog packet appender
2013-10-08 23:18:59 -04:00