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
1dc2225bd2
[winpr,wlog] include function name in log message
...
default to print the function the log message was called from
2023-01-25 16:26:39 +01:00
akallabeth
92d3e3c64a
[winpr] use WINPR_ prefix for conditional includes
2023-01-10 17:38:00 +01:00
Armin Novak
7a95c7343d
[winpr,wlog] fixed noisy wlog filter
2022-12-22 15:09:03 +01:00
akallabeth
43c5289928
Replaced memset/ZeroMemory with initializer
...
* Addes WINPR_ASSERT on many occations
* Replaced memset with array initializer
* Replaced ZeroMemory with array initializer
2022-10-14 12:11:01 +02:00
Armin Novak
d879d87610
Use static wStream for packet logger
2022-10-10 15:29:45 +02:00
akallabeth
1849632c43
Fixed format strings to match arguments ( #8254 )
...
* Fixed format strings to match arguments
Reviewed and replaced all %d specifiers to match proper type
* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
David Fort
4fc7a9417d
Various fixes / improvements ( #8146 )
...
* xfreerdp: fix typo in logs
* winpr: file appender, small code cleanup
* shadow-server: add an option for TLS secrets
This allows to dissect connections to the shadow server.
2022-08-22 09:42:15 +02:00
akallabeth
bc8b4ade1c
reformatted
2022-06-23 08:48:39 +02:00
akallabeth
2dfc1ddb12
Removed obsolete trio
2022-04-28 10:49:09 +02:00
akallabeth
667b471686
Fixed cast-quality warnings
2022-04-28 09:17:20 +02:00
Armin Novak
6ed50b4b1d
Refactored WinPR includes
2022-03-03 11:26:48 +01:00
akallabeth
c25d15d1d6
Initialize WLog prefix string buffers '\0'
2022-02-28 16:49:18 +01:00
akallabeth
861eaa693b
Removed windows debug console 4096 character limit
2022-02-28 16:49:18 +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
339cdded45
Fixed memory sanitizer warnings
2022-01-11 14:32:18 +01:00
akallabeth
1ca7e1f7a0
Added option to disable graphics decoding in client code path
2021-09-20 10:59:59 +02:00
Armin Novak
68f24477f6
Fixed compilation warnings on mac
2021-08-26 15:08:28 +02:00
Armin Novak
5afa592244
Fixed cast-qual warnings
2021-08-24 11:10:51 +02:00
Armin Novak
610396e197
Fixed compilation warnings
...
Try to get the number of warnings down
2021-08-02 10:28:06 +02: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
Armin Novak
98cd46ca9c
Fixed WLog_Uninit loop counter
2021-06-01 14:18:01 +02:00
David Fort
2f64d02272
Merge pull request #7046 from awakecoding/wlog-robustness
...
Add WLog locks to prevent logger initialization race conditions
2021-05-28 17:43:00 +02:00
Marc-André Moreau
79c469bd7a
Add WLog locks to prevent logger initialization race conditions
2021-05-28 09:27:24 -04:00
Marc-André Moreau
eb6777ea69
Fix Windows Unicode file path handling issues (+add winpr_fopen wrapper)
2021-05-26 08:40:29 +02:00
akallabeth
5075539022
Fixed log filter initialization from env
2021-04-16 16:18:07 +02:00
Martin Fleisz
71feb974ac
Merge pull request #5739 from akallabeth/improve_function_hiding
...
Improve function hiding
2019-12-02 11:31:35 +01:00
Armin Novak
7c243da6e1
Remove symbols exported by accident.
2019-12-02 10:57:31 +01:00
Armin Novak
67dc2e0bdb
Fix #5741 : Limit strnlen checks to INT_MAX to silence compile on 32bit builds.
2019-11-21 08:09:08 +01:00
Armin Novak
72ca88f49c
Reformatted to new style
2019-11-07 10:53:54 +01:00
Armin Novak
66ad508b45
Removed strlen use in wlog (and speed up check)
2019-10-29 12:58:06 +01:00
Armin Novak
f01e042211
Code cleanups (strlen, casts, size_t, ...)
2019-10-29 11:58:43 +01:00
Martin Fleisz
7edd2d8070
wlog: Fix uninitialized type in wLogMessage
2019-10-01 14:34:17 +02:00
Armin Novak
d7ca2db62e
Fixed doulbe semicolon in C files.
2019-05-08 12:58:01 +02:00
Armin Novak
617c00c8f5
WLog_IsLevelActive is now a exported function istead of inline.
...
Since this function calls WLog_GetLogLevel anyway better only
export the API to allow internal checks to be modified in the
future without breaking API
2018-11-22 16:34:38 +01:00
Armin Novak
28f51efe9c
Fixed update of log filters in case of level change.
2018-11-19 13:04:40 +01:00
Armin Novak
37a01a19d8
Fix #5024 : Update inherited log level for all child loggers when setting a new one.
2018-11-19 12:19:12 +01:00
Ondrej Holy
10b9c516f6
winpr/utils/wlog: Fix leak found by covscan
...
leaked_storage: Variable "result" going out of scope leaks the storage it points to.
leaked_storage: Variable "bt" going out of scope leaks the storage it points to.
2018-08-23 09:11:24 +02:00
Ondrej Holy
d3c2ceb0f6
winpr/utils/wlog: Format code by astyle
...
Run ./scripts/format_code.sh before the following changes.
2018-08-23 09:11:24 +02:00
Armin Novak
b260937ca6
Use __attribute__((destructor)) on non windows systems.
...
atexit in shared libraries is not universally supported.
2018-04-03 14:04:22 +02:00
Armin Novak
e1b53a282f
Fix #4524 : Initialize with cleanup handler
...
Use singleton initializer and register cleanup handler for logger.
2018-04-03 10:18:59 +02:00
Armin Novak
2d58e96dcc
Exit main thread with winpr_exit to trigger resource cleanup.
...
When using pthread_once with destructors they are only called,
if each thread (including the main thread) is exited with pthread_exit.
Introducing winpr_exit as a wrapper for that purpose.
2018-02-12 10:33:02 +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
Armin Novak
09d43a66f4
Fixed tests and dead store warnings.
2017-03-28 16:49:56 +02:00
Armin Novak
3b56cd652f
Fix format string is not a string literal
2017-03-14 10:56:00 +01:00
Armin Novak
b574e196d9
Fixed WLog_PrintMessagePrefixVA
...
WLog_PrintMessagePrefixVA is called with format being a stack variable.
Always copy the data to message->PrefixString otherwise the information
will be lost whenever the stack is destroyed.
2017-03-03 14:11:28 +01:00
Armin Novak
99c45405cb
Fixed GetEnvironmentVariable.
2017-03-03 12:43:00 +01:00
Armin Novak
b2c29158be
Scanbuild warning, argument checks and leak fixes.
...
* Added Stream_GetRemainingCapacity to check remaining stream size
before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00