akallabeth
0b035d69e1
[winpr,wlog] fix format string
...
the millisecond format string should be "%03u" instead of "%02u"
2024-05-21 14:57:26 +02:00
akallabeth
4732f379d4
[winpr,sysinfo] unify time function use
...
* Add new function winpr_GetTickCount64NS for high resolution tick
count with (up to) nanosecond resolution
* Add new function winpr_GetUnixTimeNS for high resolution system time
as nanoseconds since 1.1.1970
* Replace use of clock_gettime and gettimeofday in whole project with
these new functions
* Add new macros WINPR_TIME_NS_TO_* and WINPR_TIME_NS_REM_* to convert
the nano second count to less resolution or get the remainder in the
desired resolution
2024-03-11 09:54:10 +01:00
akallabeth
d7ebec5a65
[tidy] move loop variable declaration to loop
2024-02-22 12:31:50 +01:00
akallabeth
d0dc657412
[build] delete unused static functions
2024-02-15 11:49:16 +01:00
akallabeth
0ba995655d
[clang-tidy] cppcoreguidelines-init-variables
2024-02-15 11:49:16 +01:00
akallabeth
207def5c56
[clang-tidy] readability-isolate-declaration
2024-02-15 11:49:16 +01:00
akallabeth
bb42d425ed
[gcc,clang] add support for attribute(malloc)
...
Mark all malloc like functions and add their appropriate free function
to let the compiler complain on mismatches
2024-02-02 15:10:40 +01:00
Armin Novak
60390ea40c
[pragma] unify compiler diagnostics
2023-10-16 15:10:13 +02:00
Armin Novak
c91a250623
[warnings] add WINPR_FORMAT_ARG
...
with WINPR_FORMAT_ARG format strings are marked for MSVC to avoid
warnings
2023-10-16 15:10:13 +02:00
Armin Novak
07543a6042
[warnings] fix various warnings
...
* missing const in casts
* missing static for functions
* missing WINPR_ATTR_FORMAT_ARG for printf like functions
2023-10-16 15:10:13 +02:00
akallabeth
a94e14fb22
[winpr,wlog] fix format string for %fn
2023-09-11 14:20:10 +02:00
Armin Novak
4f7a3762ae
[winpr] fix cast warnings
2023-07-28 13:42:12 +02:00
Armin Novak
e61880d077
[standard] replace __FUNCTION__ with __func__
2023-07-27 20:02:43 +02:00
akallabeth
2521d151e5
[winpr,wlog] added %{ %} formatter
...
* New formatter %{xxx%} which conditionally prints xxx if the context is
not NULL
2023-07-06 15:51:56 +02:00
akallabeth
d0456914e5
[winpr,wlog] extend wLog to allow logging custom data
...
A logger allocated with WLog_Get now can have a customized context by
setting it with WLog_SetContext. Along with the newly introduced format
specifier %ctx an additional field is printed for the context.
2023-06-29 14:30:09 +02:00
Armin Novak
a4c6b36a19
[build] fix memory sanitizer stack frame warnings
2023-06-07 09:14:45 +02:00
Armin Novak
ba98aa0a8c
[winpr] add atexit calls for WLog and SSL providers
...
C11 atexit cleanup handler are used to call cleanup routines for WLog
and SSL on program termination. This removes false positives when using
ASAN runtime memory debugger
2023-05-30 15:42:39 +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
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