Commit Graph

79 Commits

Author SHA1 Message Date
Günter Obiltschnig
072ee8ff9e enh(Poco::Util::Timer): Add idle() method to check if timer has any tasks scheduled #4488 2024-03-11 10:06:23 +08:00
Matej Kenda
233c1f771f
mingw compile and link improvements (#4019) (#4391)
* fix(platform): MinGW Compile and link errors: undefined reference to `WinMain'

* fix(platform): MinGW compile UUID tests (conflicting UUID defined as GUID in rpcdce.h via windows.h)
2024-01-14 22:03:37 +01:00
Kari Argillander
708a5d8307
RFC: Remove Windows CE support (#4342)
* Remove _WIN32_WCE macro

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove WinCE support from build files

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. Remove all
references from build systems / scripts.

* Remove Windows CE related source and header files

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove wcelibcex folder

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove rest Windows CE mentions

There where some Windows CE mentions left. Remove those.

* Update Windows CE documentation

We should keep documentation some time so people can find reason for
remove.

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-14 00:25:04 +01:00
Andrey Masloboev
feee1650e4
fixed infinite loops (#4200)
- fixed infinite loops in config utils operation with broken streams
- added tests

Co-authored-by: Andrey Masloboev <amasloboev@topcon.com>
2023-10-19 13:26:44 +02:00
Günter Obiltschnig
7f5c7d1ab2 fix test by ignoring exception due to invalid path name on Windows 2023-10-01 17:30:27 +02:00
Günter Obiltschnig
22213f1111 #4173: AbstractConfiguration: when expanding property references, allow specifying a default value; #4174: AbstractConfiguration: support Int16/UInt16 and Int32/UInt32 2023-09-30 14:18:10 +02:00
Vojin Ilic
b8d1792fa0 Fix hang in destructor
Consider following situation. A class owns a timer. In destructor of that class we call .cancel() asynchronous on timer before it's destruction.
Now timer is executing cancel in it's own internal thread, while it's doing that destructor of timer is called from owner's destructor. Timer destructor enqueues stop notification. If that enqueue is happening just after while loop from cancel notification, stop notification is gonna be dropped and timer will never stop.
Fix: Add new method in TimedNotificationQueue which will return a notification regardless of the time it needs to be executed.
Get number of pending tasks in the queue. Flush out that many notifications from queue while taking special consideration of pending Stop and Cancel notifications.
Add test for new method in TimedNotificationQueue and fix cancel all tests to actually check if notification got executed.
fixes #3986
2023-04-04 12:08:49 +02:00
Alexander Gololobov
0fd1749b81
Use map from key to count instead of multiset (#3885)
* Test that enumerates lots of elements with the same name

* Use map from key to count instead of multiset

Co-authored-by: Alexander Gololobov <{ID}+{username}@users.noreply.github.com>
2023-01-24 00:52:23 -06:00
Vojin Ilic
46a55303ae Fix deadlock in Timer when one sync and one async cancel requests are issued
Timer is implemented with internal queue. If a user wants to cancel all pending tasks it can call .cancel to schedule CancelNotification.
As a part of processing of CancelNotification it will just flush the whole queue. It does have special processing for StopNotification so that Timer destruction doesn't get blocked.
Now if we first schedule async cancel and before this first cancel is processed we schedule another cancel but this time a sync second one will block because it is never notified that all tasks are canceled, _finished event is never set on that flushed CancelNotification.

Fix: add diffrent processing in case of CancelNotification to set all of it's _finished events.
Also add a test for this situation.
2023-01-16 11:53:11 +01:00
John Vandenberg
0e6e16645c
Remove trailing whitespace (#3668) 2022-07-07 04:18:20 -05:00
Alex Fabijanic
37cb890e58 fix(ConfigurationView): ConfigurationView and JSON is broken for array access #3635 2022-06-20 20:59:10 +02:00
Aleksandar Fabijanic
ff879f5905
Fix/tsan (#3617)
* fix(Foundation): tsan warnings fixes

* fix(Thread_POSIX): tsan warnings fixes; add tsan.suppress

* fix(Util): tsan fixes

* fix(netSSL_OpenSSL): tsan fixes

* fix(Data): tsan warnings fixes

* feat(ci): add tsan job

* feat(ci): add tsan job, another attempt

* feat(ci): add tsan job, 3rd attempt

* fix(Foundation): tsan warnings fixes

* fix(Thread_POSIX): tsan warnings fixes; add tsan.suppress

* fix(Util): tsan fixes

* fix(netSSL_OpenSSL): tsan fixes

* fix(Data): tsan warnings fixes

* feat(ci): add tsan job

* feat(ci): add tsan job, another attempt

* feat(ci): add tsan job, 3rd attempt

* fix(ResultMetadata): memory leak #3474

* feat(ci): disable ActiveDispatcher tests for tsan runs

* feat(ci): try to fix tsan options file detection (again)

* chore(TestLibrary: correct spelling

* fix(ci): fix tsan run; add -y to apt; disable samples build for some jobs

* fix(ci): add mysql ports

* feat(ci): add VS asan

* feat(double-conversion): Upgrade double-conversion to v3.2.0 #3624

* chore(asan): disable msvc asan build (dll not found)

* chore(double-conversion): move NumericString.h before double-conversion includes to prevent min/max collision; reinstate lost loongarch64

* chore(JSON): sync pdjson with upstream

* fix(Statement): Poco::Data::Statement becomes unusable after exception #2287
2022-06-01 23:47:26 -05:00
Alex Fabijanic
980cd0273b fix(CppUnit): CppUnit notEqualsMessage causing compile errors #3615 2022-05-29 11:46:33 -05:00
Kevin Dick
9a4853582f
Added LocalConfigurationView to only search inside the viewed scope (#3529) 2022-05-26 09:40:13 -05:00
Günter Obiltschnig
034ed3332d fix warning 2021-06-16 14:11:48 +02:00
Günter Obiltschnig
ea455ad891 fix warnings 2021-06-15 10:36:53 +02:00
Günter Obiltschnig
958387b6ba improved Lambda support 2020-01-26 08:41:22 +01:00
Günter Obiltschnig
1bf40a0cd2 merge some changes from develop branch; modernize and clean-up code; remove support for compiling without POCO_WIN32_UTF8 2020-01-09 10:08:09 +01:00
Jan Kevin Dick
2ac3df363c Fixed wrong Method name in WinServiceTest.
Added Comment to setFailurActions Method.
2019-11-18 12:04:51 +01:00
Jan Kevin Dick
3917135a7f Added Method to configure the Failure Actions 2019-11-18 11:24:04 +01:00
Jan Kevin Dick
9762ed37e9 Added Method to Query the Failure Actions for the Service 2019-11-18 10:29:17 +01:00
Jan Kevin Dick
34ad48d16c Added Method to check if a service is stopped 2019-11-18 10:14:39 +01:00
Jan Kevin Dick
5a484c1896 Added Constructor to create WinService with an existing Connection to a Service Manager 2019-11-18 10:08:11 +01:00
zosrothko
960ecb38f0 Poco 1.9.1 assert true (#2255)
* Rename assert by assertTrue

* Update submodules

* Missing assertTrue

* Rename poco_assertTrue to poco_assert

* Rename poco_assertTrue to poco_assert
2018-03-29 11:12:54 -06:00
Günter Obiltschnig
d73bb2ea86 fixed GH #2058: Synchronization issue in Poco::Util::Timer at destruction 2018-03-06 17:33:02 +01:00
Björn Schramke
b59329034f add some methods to Poco::Path for make it easy to follow XDG Base Directory Specification 2018-02-13 08:07:45 -06:00
Rudolf-Walter Kiss-Szakács
275275baa9 Issues #1609 and #561 have not made it into a stable release #2152 2018-02-13 07:53:41 -06:00
Guenter Obiltschnig
d172273a75 remove remaining $Id$ tags from file headers 2017-10-31 16:01:51 +01:00
Günter Obiltschnig
04e7e04d4d Remove \$Id`$ headers 2017-09-09 11:14:06 +02:00
Günter Obiltschnig
8d65ebf02a Poco::Util::LayeredConfiguration: added support for labelling configurations and finding them by their label 2017-09-01 20:23:35 +02:00
Guenter Obiltschnig
df855c88b7 fixed GH #1462: AbstractConfiguration::getUInt does not parse hex numbers 2016-10-24 09:41:49 +02:00
Guenter Obiltschnig
5df2508986 XMLConfiguration default (and single-argument delimiter) constructor now loads an empty XML document with "config" root element to make the configuration usable without an additional call to load() or loadEmpty(). 2016-10-16 13:39:17 +02:00
Pascal Bach
e2538ac6e2 Add additional test for Poco::Util::Timer
Test scheduling with Timestamp and Clock

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
2014-12-17 10:50:40 +01:00
Günter Obiltschnig
c455631e45 WinRegistryConfiguration fix 2014-11-26 10:52:49 +01:00
Guenter Obiltschnig
f848f0db19 add test for c2edf4470f 2014-11-24 18:45:41 +01:00
Günter Obiltschnig
42c814cca4 enabled WinRegistryKey and WinRegistryConfiguration for WinCE 2014-11-24 15:30:33 +01:00
Hayk Karapetyan
8b75f229f6 unit tests and changes according to comments 2014-09-12 11:02:34 +04:00
Kontinuation
ee2b99a9ba added array element update tests for JSONConfiguration 2014-05-23 22:32:32 +08:00
Guenter Obiltschnig
83b0f47ffb fixed GH# 398: PropertyFileConfiguration: input != output 2014-05-19 09:42:15 +02:00
Roger Meier
b0581433a7 LICENSE: add info about SPDX-License-Identifier usage and use it
fix: remove executable flag and change back to 100644 (was 100755)

Signed-off-by: Roger Meier <r.meier@siemens.com>
2014-05-14 08:38:09 +02:00
Roger Meier
628a06f718 LICENSE: add info about SPDX-License-Identifier usage and use it
Signed-off-by: Roger Meier <roger@bufferoverflow.ch>
2014-05-04 21:02:42 +02:00
Günter Obiltschnig
b2ba1dfb74 -added Windows Embedded Compact 2013 support 2014-03-17 14:36:17 +01:00
Guenter Obiltschnig
ad28e2fed5 more line ending fixes 2012-11-11 10:25:35 +01:00
Guenter Obiltschnig
79eab26377 the great line endings cleanup 2012-11-11 09:57:01 +01:00
Guenter Obiltschnig
83af8a3be7 WinCE fixes 2012-10-15 09:41:38 +00:00
Aleksandar Fabijanic
991fb4a31f FreeBSD modifications 2012-09-26 02:51:43 +00:00
Aleksandar Fabijanic
d8397b9153 - VS2012: build/tests
- JSON: style and exceptions catch by ref fix
- NumberParser: case-insensitive hex parsing
- Dynamic::Var: const std::string& cast operator specialization (coaxing std::string ctor)
- LocalDateTime: strftime fix (buffer too small for full tz string, use %Z instead of %z - makes no difference on windows but is more portable)
- small buildwin.cmd vsvars32.bat call fix
2012-09-24 03:51:40 +00:00
Aleksandar Fabijanic
a77bfefd69 - SF#3560505: NetworkInterface's ::forIndex, etc. methods must select all
- Util::Win x64 ifdefs
- RowFromatter documentation correction
2012-08-22 01:18:33 +00:00
Aleksandar Fabijanic
71a055c81a SF#3522081: WinRegistryConfiguration unable to read REG_QWORD values 2012-08-21 03:15:38 +00:00
Aleksandar Fabijanic
2b2a362926 SF #3544720: AbstractConfigurator to support 64bit values 2012-08-21 02:42:57 +00:00