Commit Graph

5958 Commits

Author SHA1 Message Date
Matej Kenda
76ea8c74c8 enh(C++17): Net: Modernisation of socket class declarations. 2024-11-19 21:45:40 +01:00
Matej Kenda
efb0745efc enh(SocketReactor): Introduce protected accessors to private members to be used in derived classes. 2024-11-19 21:45:40 +01:00
Milan Tepic
64d8777a0e feat(WindowsBuild): customizable path to include for pocoNetworkInitializer #4769 2024-11-19 16:40:51 +01:00
Matej Kenda
52959b91da
DB logger sample (#4759)
* sample(DBLogger): New sample to demonstrate DB logging to a file. (#4750)

* sample(DBLogger): Create messages via SQL logger in a thread (#4750)

* sample(DBLogger): Save messages from SQL files to an SQL database (works with SQLite) (#4750)

* chore(Makefile): Data samples depend on PocoUtil (#4750)

* sample(DBLogger): Refactored DBLogger with std::filesystem::directory_iterator and std::thread.

* sample(DBLogger): Add missing include <condition_variable>

* sample(DBLogger): Extracted log scanning and inserting functionality to class SQLLogInserter.

* sample(DBLogger): Create new logging table only when using demo messages option.

* feat(DBLogger): VS projects

* sample(DBLogger): Acquire options from configuration file.

* feat(DBLogger): regenerate VS projects (progen file change)

* sample(DBLogger): Add example DBLogger.properties file.

* sample(DBLogger): Process as much as possible when stopping processing.

* sample(DBLogger): Meaningful defaults in properties file.

* sample(DBLogger): Verify validity of database session on startup.

* sample(DBLogger): Configure demo SQL channel in properties file.

* chore(DBLogger): style and warnings

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-11-18 17:06:20 +01:00
Günter Obiltschnig
2815ea45a9 enh(Net): add PollSet::size(); mark PollSet::count() as deprecated 2024-11-17 22:16:52 +01:00
Günter Obiltschnig
c386bba27c
Merge pull request #4774 from pocoproject/feat/nonblocking
Non-blocking sockets support (TLS, WebSocket)
2024-11-16 23:26:10 +01:00
Günter Obiltschnig
ea4b07a77d fix(tests): CodeQL issues 2024-11-16 21:54:16 +01:00
Günter Obiltschnig
a106ebd1f1 fix(tests): CodeQL warnings 2024-11-16 20:06:59 +01:00
Günter Obiltschnig
c95ac60a6e fix: data race in test 2024-11-16 20:00:48 +01:00
Günter Obiltschnig
163509eb57 fix(WebSocket): re-add assignment operators 2024-11-16 18:56:03 +01:00
Günter Obiltschnig
63b4bfd8ba chore(WebSocket): docs 2024-11-16 18:42:38 +01:00
Günter Obiltschnig
6b2a8abd96 chore: fix tests 2024-11-16 18:05:10 +01:00
Günter Obiltschnig
a4159b1723 chore(NetSSL): msvc project files 2024-11-16 17:23:44 +01:00
Günter Obiltschnig
7780f379ea fix(NetSSL_Win): Non-blocking sockets support #4773 2024-11-16 16:50:52 +01:00
Günter Obiltschnig
bf09be3f33 fix(NetSSL): Non-blocking sockets support #4773 2024-11-16 16:50:38 +01:00
Günter Obiltschnig
cedd086362 feat(Net): Non-blocking WebSocket #4773 2024-11-16 16:49:50 +01:00
Günter Obiltschnig
5d69308bfd fix(Net): Non-blocking sockets support #4773 2024-11-16 16:48:48 +01:00
Matej Kenda
cb91880bfb fix(cmake): properly define POCO_DLL and POCO_STATIC based on BUILD_SHARED_LIBS. 2024-11-14 08:14:08 +01:00
Alex Fabijanic
db9ba69f7d fix(Data): warning: 'isNull' overrides a member function but is not marked 'override' #4768 2024-11-13 18:35:00 -06:00
Matej Kenda
fe27933a12
update(expat): version 2.6.4 (#4760) (#4767) 2024-11-13 18:59:32 +01:00
Aleksandar Fabijanic
c4f66d5188
fix(OpenSSL) Openssl DH key size (#4753)
* Fixed incorrect SSL_CTX_set0_tmp_dh_pkey() usage

* fix(OpenSSL): use DH group enum

* fix(IPAddress): windows scoped test, part II #4644

* fix(OpenSSL): fuzz errors #4663

* chore: remove misplaced comment

---------

Co-authored-by: Peter Klotz <peter.klotz99@gmail.com>
2024-11-11 19:01:00 +01:00
Aleksandar Fabijanic
9530a77347
Insert NULL using BULK #4001 (#4755)
* fix(ODBC): Insert NULL using BULK #4001
resolve bound types and sizes at compile time

* fix: remove string suffix for static_assert

* Insert NULL using BULK #4001

* fix: typo

* fix(SQLite): missing functions; consolidate extract calls

* chore(SQLite): remove unnecessary typedef

* fix(SQLite): remove duplicate functions

* fix(SQLite): compile errors and warnings

* fix(SQLite): extract implementation signatures

* fix(SQLite): long64 platforms compile errors

* fix(SQLite): long64 platforms compile errors, part ii

* fix(ODBC): windows build

* fix(ODBC): MSSQL big string on windows

* fix(Data): psql and mysql compile errors

* fix(PostgreSQL): add missing functions

* fix(ODBC): revert column size discovery (breaks Oracle)

* fix(PostgreSQL): Nullable extraction #4001

* fix(MySQL): Nullable extraction #4001

* chore(Data): code tidy up

* fix(ODBC): add missing changes
2024-11-11 18:23:21 +01:00
Lara Dzivdzanovic
fe9c13102d
feat(PocoDoc): search support (#4494)
* feat(PocoDoc): search support

* feat(PocoDoc): enable FTS5 for search support

* feat(PocoDoc): enable FTS5

* chore(pocodoc): edit comment

* fix(StreamCopier): add argument to seekg

* enable searchIndex through the command line

* Add minor updates for search support

* Update of vs90 and regeneration of vs160 and vs170 projects

* Enhance configure script:FTS5 support for SQLite in --sqlite-fts flag

* Add tests for FTS3 and FTS5

* regeneration of vs160 and vs170 projects

* added missing lib data in CMake

* Update vs90 project and regenerate vs160 and vs170 projects with added Data include paths

* Revrting ProGen_vs170.vcxproj

* Revert ProGen in vs170 and regenerate PocoDoc vs160/vs170 projects to include updated Data path

* added missing includes

---------

Co-authored-by: Lara <lara@debian-gnu-linux-12.localdomain>
2024-11-11 16:53:05 +01:00
Alex Fabijanic
c8dade87a6 fix(ci): OpenSSL EoL on mac/brew #4764 2024-11-08 16:58:46 -06:00
Aleksandar Fabijanic
c156f0b357
fix(HTTPSClientSession): There is no way to resolve host in advance and connect to HTTPS server with SNI. #4395 (#4751) 2024-11-05 20:46:42 +01:00
Nino Belušić
ca63bf0db9
4245 codeql review and configuration (#4758)
* ci: bump action versions #4245

* ci: temporarily disable python install #4245
2024-11-05 20:07:45 +01:00
Alex Fabijanic
60a45e4bb3 chore: remove misplaced comment 2024-10-31 08:09:52 -05:00
Alex Fabijanic
c3abc7b1ec fix(IPAddress): windows scoped test, part II #4644 2024-10-30 22:41:11 -05:00
Alex Fabijanic
13ea31f442 fix(IPAddress): windows scoped test #4644 2024-10-30 22:16:27 -05:00
Aleksandar Fabijanic
59afdc2c04
fix(NetSSL): Incorrect setting of ciphersuites for TLSv1.3 #4610 (#4752) 2024-10-31 01:12:51 +01:00
Alex Fabijanic
c77d021790 fix(IPAddress): TryParse scoped ipv6 addressess for addresses enclosed in [ ] #4644 2024-10-31 00:39:37 +01:00
nitram96
6dadf9adc5
Activity now sets _running flag to false when it finishes (#4748)
Activity _running flag is now set to false when the activity finishes or throws, previously it was only set if wait had been called. Added test for this scenario
2024-10-30 16:59:08 +01:00
Matej Kenda
7df5ec45b8
fix(Data::ODBC): use connection and login timeouts in ODBC session implementation (#4721)
* fix(Data::ODBC): use connection and login timeouts in ODBC session implementation (#4366)

* fix(Data::ODBC): use only connection timeout in ODBC session implementation (#4366)

* fix(ODBC): consolidate login timeout; create temp directory if it doesn't exist #4366

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-10-30 16:52:45 +01:00
Eric Eichhorn
82c17ea813 fix: aix build #4742 2024-10-23 13:51:06 +02:00
Matej Kenda
c735162abc
fix(NamedEvent): Release semaphore ID in dtor when created with semget (fixes #2971) (#4357)
* fix(NamedEvent): Release semaphore ID in dtor when created with semget (#2971)

* Temporary: trying to solve for non-Linux semaphores.

* chore(NamedEvent): Cleanup of Posix NamedEvent and fixes of unit test.
2024-10-20 10:05:50 +02:00
Aleksandar Fabijanic
36c808230c
fix(ODBC): Poco:Data::ODBC - MSSQL (n)varchar(max) length issue #4324 (#4738)
* fix(ODBC): Poco:Data::ODBC - MSSQL (n)varchar(max) length issue #4324

* chore(ODBC): remove unused vars; fix SQL Server SDK include path #4324

* fix(ODBC): trim UTF16 string #4324

* chore(ODBC): add compile time big string diagnostics #4324

* chore(ODBC): add SQLServer big string vector test case #4324

* fix(ODBC): detect SQLServer header #4324

* chore: add listing msodbdcsql18 folder #4324

* ci: change odbc drivers installation order #4324

* chore(CMake): Add option ENABLE_DATA_SQL_SERVER_BIG_STRINGS, auto-detection of msodbcsql.h on Linux and macOS

* fix(ODBC): detect backend at runtime for string size; add Session::dbmsName() #4324

* fix(ODBC): wrong char to string conversion #4324

---------

Co-authored-by: cunj123 <n.belusic@pta.hr>
Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-10-19 21:43:00 +02:00
Aleksandar Fabijanic
9a97e7ca0d
fix(Data): RecordSet issue since 1.10.0 (#4739)
* fix(Data): RecordSet issue since 1.10.0

* fix(RecordSet): copy, move #4525
2024-10-17 01:39:31 +02:00
Aleksandar Fabijanic
e5752a5c6d
File lock (#4734)
* add RWLock implementation for file [posix]

* add implementation FileStreamRWLock for windows
replace FileStreamRWLock to the Process package

* add files FileStreamRWLock* into makefile and vcproj

* remove unnecessary file from makefile

* use absolute path to the TesApp with ProcessRunner

* fix vc*.proj

* add new test files into vc.proj.filters

* fix comments

* fix spelling fo PR #4723
add atomic_bool _locked and check if FileStreamRWLock is locked on
destruction for force unlock

* add atomic header

* File lock (#4740)

* throw error on any errno not only on EDEADLK

* fix function naming

* fix windows build

* fix windows build

---------

Co-authored-by: Alexander B <ale.bychuk@gmail.com>
Co-authored-by: bas524 <bas524@ya.ru>
2024-10-16 23:58:00 +02:00
Matej Kenda
6f34ec89ce fix(cmake): increase minimum version to 3.15, fix Data::PostgreSQL include target, remove unnecessary cmake modules that are provided with CMake itself (#4540) 2024-10-16 12:09:24 +02:00
Aleksandar Fabijanic
f0a29487b6
feat(ServerApplication): termination callback #4643 (#4733)
* feat(ServerApplication): termination callback #4643

* chore(ServerApplication): spelling fix #4643

* chore(ServerApplication): correct documentation #4643
2024-10-15 17:49:28 +02:00
Aleksandar Fabijanic
71a085c1dc
chore(JSON): add stringify unicode tests #4707 (#4720)
* chore(JSON): add stringify unicode tests #4707

* enh(Mutex): Error code for pthread_mutex_lock failure #4712
2024-10-14 13:48:45 +02:00
Aleksandar Fabijanic
8e958f685f
2808 data nullable (#4729)
* chore(CppUnit): disable MSVC secure warning

* chore(Data): regenerate VS projects

* chore(DataTest): regenerate VS projects

* chore(Data/testsuite): regenerate VS projects

* chore(DataTest): fix VS90 project

* fix(ODBC): Failed to insert Poco::Nullable< Poco::Data::Date> data into MSSQL using ODBC #2808

* chore(Foundation): add Trace to VS project

* chore(Trace): add Trace VS projects #4692

* fix: g++ and clang build #2808
2024-10-12 20:42:39 +02:00
tyler92
aa0faed54f
test: move fuzzing tests from google/oss-fuzz repository (#4719) 2024-10-10 13:30:10 +02:00
Matej Kenda
c038b52f36 chore(Poco): Resolve a lot of warnings, reported by g++ 13. 2024-10-10 10:41:24 +02:00
Aleksandar Fabijanic
88c4958032
Serializable Isolation level for SQLite Databases (#4693)
* fix #4536
I've add transaction isolation support for SQLite
Warning! SQLite transactions are [serializable by design](https://
www.sqlite.org/isolation.html) but my implementation retuns false in
function hasTransactionIsolation and throw an exception in
setTransactionIsolation

* disable shared cache in TearDown()

* chore(doc): reword documentation

* we should waitresult of select before rollback (#4718)

---------

Co-authored-by: Alexander B <ale.bychuk@gmail.com>
2024-10-10 10:41:02 +02:00
Aleksandar Fabijanic
eaabd3ff8d
Stack trace (#4691)
* chore(Trace): add dev env settings

* add(Trace): init add Poco::trace and libbacktrace files

* feat(Exception): generate stack trace if enabled at compile time

* chore(DNSSD): remove binaries from git

* fix(Trace): build

* chore(ci): exclude exception text tests for trace build; add debug test script params

* chore(build): mac (dl)

* chore(cmake): Changes to build Trace with CMake.

* chore(cmake): Changes to build Trace on Windows

* chore(cmake): Improvements to include trace sample.

* chore(cmake): Fixes to properly build/link Trace on Linux

* chore(cmake): add_definitions --> add_compile_definitions

* chore(cmake): Build Trace as static and don't export it.

* chore(make): Link Trace with built-in libbacktrace on Linux

* chore(Trace): remove unnecessary sources for libbacktrace.

* chore(github): enable trace on a few github checks

* chore(cmake): Build Trace with clang++ on Linux.

* chore(cmake): Properly set POCO_ENABLE_TRACE globally when needed.

* fix(cmake): Trace: corrected include for clang on Linux

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-10-10 10:36:13 +02:00
Matej Kenda
a1efeaa72d
GitHub runner ubuntu 24.04 and resolve some issues (#4727) 2024-10-09 21:53:49 +02:00
Matej Kenda
13bbea759f Merge branch 'github-macos-runners-update' 2024-10-07 17:08:36 +02:00
Marco Rebhan
3b79a51722 Explicitly define conditional LOB constructors for const (w)string &
This fixes compilation against libcxx 19, which removed the
non-standard specializations for std::char_traits including the one
for unsigned char, which would get instantiated for BLOB.
See https://reviews.llvm.org/D138307 and
https://reviews.llvm.org/D157058.

Closes #4722.
2024-10-07 13:59:19 +02:00
Matej Kenda
568f325417 chore(gitlab): macos-12 images are being deprecated, update ci.yml to use newer ones.
https://github.com/actions/runner-images/issues/10721
2024-10-07 13:57:33 +02:00