Commit Graph

5449 Commits

Author SHA1 Message Date
xiao
39a207ce62
Avoid epoll_wait causing the lock to not be released (#3983)
* Avoid epoll_wait causing the lock to not be released.

* code style
2023-03-27 15:48:54 -05:00
Aleksandar Fabijanic
bcae06f423
3808 icmp statistics (#3982)
* fix(ICMPClinet): ICMPEventArgs Statistics bugs #3808

* fix(SpinlockMutex): 100 % CPU usage on single-core system #3852
2023-03-22 09:11:13 -05:00
Anton
93d18162f3
Add ODBC DirectExec public API (#3502)
* ODBC sqlDirectExec

* doc

* Small fix

* Fix tabs, add missing const, fix style

* Add test case

* Small fixes

* suggested fix for async

* test for returned values
2023-03-22 00:51:57 -05:00
Matej Kenda
3838070146
Resolves #3484: support for OP_MSG in Poco::MongoDB (#3902)
* Binary writer/reader: add writeCString and readCString.

* MongoDB::Database: add queryBuildInfo and queryServerHello; add WireVersion enum.

* MongoDB: Introduce OpMsgMessage (request and reply) and related changes in Connection, Database, MessageHeader.

* MongoDB: First unit test changes for OpMsgMessage.

* MongoDB::Document: new functions addNewArray and remove.

* MongoDB: OP_MSG unacknowledged write and many improvements

* MongoDB: new cursor using OP_MSG

* MongoDB: bunch of new tests for OP_MSG wire protocol.

* BinaryWriter::WriteCString: use write instead of operator <<.

* MongoDB::OpMsgCursor: Slightly modified prototype code for using moreToCome flag.

* MongoDB: Add OpMsg* files to Makefiles.

* MongoDB: Add OpMsg* files to VS project files.

* Compile fixes.

* MongoDB::Database: Add factory function for database commands createOpMsgMessage() and cursors createOpMsgCursor()
2023-03-20 01:50:15 -05:00
Alex Fabijanic
57a531573f Merge branch 'devel' of https://github.com/pocoproject/poco into devel 2023-03-18 11:25:33 +01:00
cesar
cee8c96146 Added system_error header to SockerProactor for std::error_code references (#3883) 2023-03-18 11:25:07 +01:00
Alexander B
7ab7a5291d
Improve implementation of logging macros. #2331 (#3862)
* Improve implementation of logging macros. #2331

The GNU compiler emits a warning if nested "if" statements are followed by
an "else" statement and braces are not used to explicitly disambiguate the
"else" binding.  This leads to problems with code like:

   if (gate)
     ASSERT_*(condition) << "Some message";

The "switch (0) case 0:" idiom is used to suppress this.

* I was wrong.
do-while better then switch-case approach for "ambiguous else blocker"
https://godbolt.org/z/W5nnYrzx6

* try to fix tabs

* again fix tabs

* again fix tabs

* again fix tabs
2023-03-18 05:21:32 -05:00
Aleksandar Fabijanic
6207b8fb56
fix(devel): add missing 1.11 releases commits (#3976) 2023-03-18 01:29:14 -05:00
Alexander B
3852a6b6c2
Solaris.build fix #3843 and #3643 (#3939)
* try fix compilation for solaris

* this commit for issue #3843 and #3643
changes in Types.h allow ignore problem with declaration of std::int8_t. int8_t can be defined as char or signed char. IMHO we need strong types for Poco::Int's

Envelop.cpp contains initializer for EVP_CIPHER_CTX_init, because this function prototype depends on openssl version.

Application.cpp contains includes especial for SOLARIS, for ioctl support

ClassLoaderTest.cpp and SharedLibraryTest.cpp contains changes because loadlibrary(dlopen) doesn't load library from current directory by default

LocalDateTimeTest.cpp contains changes because SOLARIS use std::tm without tm_gmtoff

* fix : define of SOLARIOS OS in LocalDateTimeTest

* remove unnecessary wrapper

* fix output dir for windows build with multi-config build

* try to fix bug with unixodbc version in linux-builds
[read here](https://github.com/microsoft/linux-package-repositories/issues/36)

* try to fix bug with unixodbc version in linux-builds
[read here](https://github.com/microsoft/linux-package-repositories/issues/36)

* fix : warning in main cmake for if-condition for multi-config build
fix : error for linux-gcc-make-cxx20, use --allow-downgrades for unixodbc

* fix : warning for cmake windows builds
revert changes for linux-gcc-make-cxx20

* revert ci.yml, remove unixodbc version

* try re-run build

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
2023-03-18 01:28:47 -05:00
Andrew Auclair
66e93f98cc
Custom rotate, archive and purge strategies for FileChannel (#3810)
* Adding the ability to set custom rotate, archive and purge strategies.

* Force CI
2023-03-18 01:28:25 -05:00
chrisbednarski
e0e628ac7e
fix(build): fix build with openssl 3.1.0 on vs2022 (#3969)
* fix log verbosity in windows powershell build script

* stop paths being added multiple times to environment variables

* pass useenv property to msbuild

* linking issue: include crypto.h prior to config.h so POCO_EXTERNAL_OPENSSL is initialised

* resolve poco_base path in powershell script

* build against any available windows sdk
2023-03-17 17:45:56 -05:00
Gleb Popov
f6c3017b3e
Do not incur insane stack limit in Foundation-ThreadPool test. (#3861)
This fixes the test on FreeBSD.
2023-03-17 16:09:38 -05:00
MailShop
abd06ab4d9
ODBC: Fix DataFormatException getting Time value from SQL Server (#3802) 2023-03-17 15:51:57 -05:00
gyee-penguin
85f74867ef
Fixed compile error with OpenSSL 1.0 systems (#3739) (#3912) 2023-03-17 15:45:30 -05:00
micheleselea
60faa4fb58
hasMicrosecond is undefined (#3842) 2023-03-17 15:42:41 -05:00
Samuel Thibault
d05d689622
Add GNU Hurd support (#3946)
Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
2023-03-17 15:24:57 -05:00
Conor Burgess
9a374ca2de
Fix error handling with OpenSSL 3.0 in SecureSocketImpl.cpp (#3971) 2023-03-17 10:07:37 -05:00
Günter Obiltschnig
feb1e24cfd
Merge pull request #3943 from jayoh-dev/feature/fix-qnx-build
Fix build for QNX
2023-02-14 07:03:12 +01:00
Jay
c79ae36c2a Fix build for QNX 2023-02-14 14:27:31 +09:00
Gleb Popov
b668742447
Fix typo in the exception message (#3858) 2023-01-27 05:26:33 -06:00
Alexander B
6c9078d673
fix issue #3815 (#3932)
Poco can be built with ENABLE_UTIL=ON and ENABLE_XML=OFF, but use of Poco::Util requires Poco::XML
2023-01-27 05:25:31 -06:00
Denis CLAVIER
d4e2e00482
Fix multicast leave group (#3929)
* Fix multicast leave group

* Add test to join and leave a multicast group

Co-authored-by: Denis CLAVIER <denis.clavier@c-s.fr>
2023-01-24 05:46:10 -06:00
Aleksandar Fabijanic
ac0c62ebf4
3925 c mysql compile fail (#3928)
* fix(CI): CI MySQL compile fail #3925 (Linux)

* fix(CI): CI MySQL compile fail #3925 (Linux, 2nd attempt)

* fix(CI): CI MySQL compile fail #3925 (OSX)
2023-01-24 02:35:10 -06:00
Yevgen Pogribnyi
85c68e7a81
Fix epollfd validity checks when compiling with wepoll (#3855) 2023-01-24 01:02:47 -06:00
Fabio R. Sluzala
c693b0b1b2
Remove unnecessary duplication of std::string in NumberParser::tryParseFloat (#3864) 2023-01-24 01:00:15 -06:00
Byungjun Lee
5430b4c5b6
Fix Aix Build (#3860)
* Fix : Aix System NumberFormatter Build Error

* Fix : Aix System OpenSSL 3.0 Build Support

 - https://github.com/openssl/openssl/blob/openssl-3.0.0/NOTES-UNIX.md?plain=1#L110

* Add : Aix System Gcc Build Support

* Revert "Add : Aix System Gcc Build Support"

This reverts commit b9a4b90e39.

* Add : Aix System Gcc Build Support
2023-01-24 00:55:17 -06: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
R. Savchenko
079b50e0c1
Guard NOMINMAX ifdef (#3906) 2023-01-24 00:42:43 -06:00
Niketin
b941a20b8c
Fix typo in example (#3894)
using a dereference operator does not work here
2023-01-24 00:41:40 -06:00
Günter Obiltschnig
ed7aface46
Merge pull request #3927 from thomkopp/feat/cppparser-global-ns-support
CppParser: Support return values which are specified to be in the global namespace
2023-01-23 22:18:14 +01:00
Alex Fabijanic
4ceb731bba feat(Process): Add options to disable STDIO in child process #3867 2023-01-23 12:23:03 +01:00
Alex Fabijanic
feee864950 fix(TZInfo): Static FastMutex fails to lock when issued from another thread on linux #3918 2023-01-23 08:06:55 +01:00
Günter Obiltschnig
091c1af26a
Merge pull request #3920 from vojinilic/fixDeadlockInTimer
Fix deadlock in Timer when one sync and one async cancel requests are issued
2023-01-17 15:26:11 +01:00
Günter Obiltschnig
0b19ffb628 Merge branch 'devel' of github.com:pocoproject/poco into devel 2023-01-16 13:51:44 +01:00
Günter Obiltschnig
8ebbac8a41 updated style guide 2023-01-16 13:51:14 +01: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
Günter Obiltschnig
69d15c5ddd fix include/lib paths for Apple Silicon 2022-11-17 11:47:18 +01:00
Günter Obiltschnig
4e8837db9e GH #3876: Replace sprintf with snprintf in Environment and NumberFormatter to avoid deprecation warnings 2022-11-17 11:44:46 +01:00
Günter Obiltschnig
5a252fddcb #3859: zlib headers not updated 2022-11-10 19:15:55 +01:00
Günter Obiltschnig
99936745e4 #3147: Reading from request stream hangs when "Transfer-Encoding: chunked" is used 2022-11-10 19:12:58 +01:00
Alexander B
aa48d39dbd
testDynamicStructEmptyString always failed (#3863)
There was 1 failure:
 1: N7CppUnit10TestCallerI7VarTestEE.testDynamicStructEmptyString
    "expected: "{ "Empty": "", "Space":   }" but was: "{ "Empty": "", "Space": " " }""
    in "src/VarTest.cpp", line 2294

It's happen because in test we call aStruct.toString(false).
It's mean that we don't expect wrapping, but expected result was written with wrapping
2022-11-08 02:11:10 -06:00
Günter Obiltschnig
894180f943 #3852: SocketReactor - 100 % CPU usage on single-core system 2022-10-31 14:01:13 +01:00
Günter Obiltschnig
dac733d055 #3849: Upgrade bundled libexpat to 2.5.0 [fixes CVE] 2022-10-31 13:26:08 +01:00
Günter Obiltschnig
4328fab724 updated changelog 2022-10-24 09:46:11 +02:00
Günter Obiltschnig
1ea6eea406 #3847: Upgrade bundled SQLite to 3.39.4 2022-10-24 09:30:01 +02:00
Günter Obiltschnig
fcf173fd49 #3805: Upgrade expat to 2.4.9 2022-10-24 09:21:36 +02:00
Günter Obiltschnig
d67e2de42a #3846: Upgrade bundled zlib to 1.2.13 [fixes CVE] 2022-10-24 09:00:59 +02:00
Alex Fabijanic
dae96c1110 (chore): remove inadvertently added file 2022-10-23 12:34:05 +02:00
Alex Fabijanic
1319d3f7ef fix(SocketImpl): available() #3834 2022-10-23 12:30:59 +02:00
Hernan Martinez
2effb38396
Progen Net and Net's TestSuite to add ARM64 configurations (#3828) 2022-10-23 05:23:34 -05:00