mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-14 11:06:57 +01:00
Merge branch 'poco-1.10.1' into devel
This commit is contained in:
commit
aec9205eab
222
.travis.yml
222
.travis.yml
@ -3,18 +3,9 @@ language: cpp
|
||||
cache:
|
||||
- apt
|
||||
|
||||
before_install:
|
||||
# we need a recent version of CMake
|
||||
# linux prereqisite packages
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget --no-check-certificate https://www.cmake.org/files/v3.5/cmake-3.5.1-Linux-x86_64.tar.gz; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then tar -xzvf cmake-3.5.1-Linux-x86_64.tar.gz; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y libssl-dev unixodbc-dev libmysqlclient-dev g++-arm-linux-gnueabi g++-arm-linux-gnueabihf clang-3.5 libc++-dev ninja-build sloccount cppcheck; fi
|
||||
|
||||
services:
|
||||
- mongodb
|
||||
- redis-server
|
||||
- redis
|
||||
- postgresql
|
||||
- mysql
|
||||
|
||||
@ -28,15 +19,12 @@ notifications:
|
||||
slack:
|
||||
secure: "EKysuMlTU3Uv5XFX+zuwHK/ej4wtD8+UjO5xvchCFMkRgM0V3rERVT1rV6NocNBH4hjTcvue9DEKdWAtqdDh06vTOHGKdnZ/e204jA38HfcIA0SPVbQXzjckQXALvKl51OPOmGuI7Feo4wyohzUyGoDLo1bom02xqDfC3caQB5Q="
|
||||
|
||||
env:
|
||||
global: TEST_NAME=""
|
||||
|
||||
before_script:
|
||||
- echo ${TEST_NAME}
|
||||
|
||||
matrix:
|
||||
jobs:
|
||||
include:
|
||||
- env: TEST_NAME="android API level 19"
|
||||
- name: Android (API level 19)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
@ -65,7 +53,10 @@ matrix:
|
||||
/opt/android-sdk/cmake/3.10.2.4988404/bin/cmake --build cmake-build --target all #&&
|
||||
#cd cmake-build && travis_wait 30 /opt/android-sdk/cmake/3.10.2.4988404/bin/ctest -E Foundation --output-on-failure FIXME Android emulator hangs
|
||||
|
||||
- env: TEST_NAME="android API level 24 arm64-v8a"
|
||||
- name: Android (API level 24 arm64-v8a)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
@ -94,50 +85,166 @@ matrix:
|
||||
/opt/android-sdk/cmake/3.10.2.4988404/bin/cmake --build cmake-build --target all #&&
|
||||
#cd cmake-build && travis_wait 30 /opt/android-sdk/cmake/3.10.2.4988404/bin/ctest -E Foundation --output-on-failure FIXME Android emulator hangs
|
||||
|
||||
- env: TEST_NAME="clang (make)"
|
||||
- name: Linux (clang, make)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
compiler: clang
|
||||
script:
|
||||
- ./configure --everything --omit=PDF --config=Linux-clang && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
# - env: TEST_NAME="arm-linux-gnueabi- (make)"
|
||||
# script:
|
||||
# - ./configure --omit=PDF,Data/ODBC,Data/MySQL,Crypto,NetSSL,PageCompiler && make all -s -j2 CROSS_COMPILE=arm-linux-gnueabi- POCO_TARGET_OSARCH=armv7l
|
||||
|
||||
- env: TEST_NAME="gcc-5.4.0 (CMake)"
|
||||
- name: Linux (gcc, make)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
compiler: gcc
|
||||
script:
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && cd cmake-build && sudo -s PWD=`pwd` PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH ctest --output-on-failure -E "(DataMySQL)|(DataODBC)"
|
||||
- ./configure --everything --omit=PDF && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
- env: TEST_NAME="clang (CMake)"
|
||||
compiler: clang
|
||||
- name: Linux (gcc, make, arm64)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: arm64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- libmysqlclient-dev
|
||||
compiler: gcc
|
||||
script:
|
||||
# skip some libs due to build timeout
|
||||
- ./configure --everything --omit=PDF,Data/ODBC,Data/PostgreSQL,MongoDB,Redis && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
- name: Linux (gcc, make, ppc64le)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: ppc64le
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
compiler: gcc
|
||||
script:
|
||||
- ./configure --everything --omit=PDF,Redis,MongoDB && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
- name: Linux (gcc, make, s390x)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: s390x
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
compiler: gcc
|
||||
script:
|
||||
- ./configure --everything --omit=PDF && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
- name: macOS (clang, make)
|
||||
os: osx
|
||||
osx_image: xcode11.3
|
||||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- openssl
|
||||
- mysql-client
|
||||
script:
|
||||
- ./configure --everything --omit=PDF,Data/ODBC,Data/PostgreSQL && make all -s -j2 && sudo make install
|
||||
- sudo -s ./travis/runtests.sh
|
||||
|
||||
- name: Linux (gcc, cmake)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
- ninja-build
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
script:
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && cd cmake-build && sudo -s PWD=`pwd` PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH ctest --output-on-failure -E "(DataMySQL)|(DataODBC)"
|
||||
|
||||
- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
|
||||
- name: Linux (clang, cmake)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
compiler: clang
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
- ninja-build
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
script:
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all && cd cmake-build && sudo -s PWD=`pwd` PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH ctest --output-on-failure -E "(DataMySQL)|(DataODBC)"
|
||||
|
||||
- name: Linux cross (arm-linux-gnueabi-g++, cmake)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
- ninja-build
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
- g++-arm-linux-gnueabi
|
||||
script:
|
||||
- export CC="arm-linux-gnueabi-gcc"
|
||||
- export CXX="arm-linux-gnueabi-g++"
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
||||
|
||||
- env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)"
|
||||
- name: Linux cross (arm-linux-gnueabihf-g++, cmake)
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
- ninja-build
|
||||
- libssl-dev
|
||||
- unixodbc-dev
|
||||
- libmysqlclient-dev
|
||||
- g++-arm-linux-gnueabihf
|
||||
script:
|
||||
- export CC="arm-linux-gnueabihf-gcc"
|
||||
- export CXX="arm-linux-gnueabihf-g++"
|
||||
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
||||
|
||||
# TODO osx build
|
||||
# TODO run test suite
|
||||
# script:
|
||||
# - ./configure && make all -s -j2
|
||||
# - sudo ifconfig -a
|
||||
# - sudo ifconfig venet0 multicast
|
||||
# - sudo ifconfig -a
|
||||
# - export POCO_BASE=`pwd`
|
||||
# - sudo -E build/script/runtests.sh
|
||||
|
||||
# build documentation and release
|
||||
- env: TEST_NAME="documentation & release"
|
||||
- name: Documentation & Release
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
compiler: clang
|
||||
script:
|
||||
- . env.sh && mkdoc all && mkrel all
|
||||
@ -145,21 +252,44 @@ matrix:
|
||||
|
||||
# QA jobs for code analytics and metrics
|
||||
# static code analysis with cppcheck (we can add --enable=all later)
|
||||
- env: TEST_NAME="cppcheck"
|
||||
- name: CppCheck
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cppcheck
|
||||
script: cppcheck --force --quiet --inline-suppr -j2 -iData/SQLite/src/sqlite3.c .
|
||||
|
||||
# search for TODO within source tree
|
||||
- env: TEST_NAME="TODO"
|
||||
- name: TODO
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
script: grep -r TODO *
|
||||
|
||||
# search for FIXME within source tree
|
||||
- env: TEST_NAME="FIXME"
|
||||
- name: FIXME
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
script: grep -r FIXME *
|
||||
|
||||
# search for HACK within source tree
|
||||
- env: TEST_NAME="HACK"
|
||||
- name: HACK
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
script: grep -r HACK *
|
||||
|
||||
# some statistics about the code base
|
||||
- env: TEST_NAME="sloccount"
|
||||
- name: Sloccount
|
||||
os: linux
|
||||
dist: bionic
|
||||
arch: amd64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- sloccount
|
||||
script: sloccount .
|
||||
|
@ -11,6 +11,9 @@ Release 1.10.1 (2020-02-10)
|
||||
- GH #2791: allow pre-allocation of the buffer in Poco::LogStreamBuf.
|
||||
- GH #2816: Modernise TLS configuration
|
||||
- GH #2818: Add getSpecifiedPort() method in Poco::URI.
|
||||
- GH #2909: Test failures on s390x architecture with 1.10.0
|
||||
- GH #2911: Poco::UTF16Encoding and Poco::UTF32Encoding byte order conversion bug
|
||||
- GH #2912: Poco::SHA2Engine computes incorrect hash on big-endian systems
|
||||
- MySQL: resetting the session when putting it back into a SessionPool is now optional
|
||||
(and disabled by default) due to a bug in MySQL messing up the character encoding when doing so.
|
||||
- Poco::AutoPtr and Poco::SharedPtr now support comparison with nullptr.
|
||||
|
@ -46,7 +46,7 @@ TextTestResult::TextTestResult(const std::string& ignore):
|
||||
ifs.close();
|
||||
}
|
||||
}
|
||||
catch (std::exception e)
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
@ -147,7 +147,7 @@ void TextTestResult::addFailure(Test* test, CppUnitException* e)
|
||||
void TextTestResult::startTest(Test* test)
|
||||
{
|
||||
TestResult::startTest(test);
|
||||
_ostr << "\n" << shortName(test->toString()) << ": ";
|
||||
_ostr << "\n" << shortName(test->toString()) << ": " << std::flush;
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
/// Connection string format:
|
||||
/// <str> == <assignment> | <assignment> ';' <str>
|
||||
/// <assignment> == <name> '=' <value>
|
||||
/// <name> == 'host' | 'port' | 'user' | 'password' | 'db' | 'compress' | 'auto-reconnect' | 'reset'
|
||||
/// <name> == 'host' | 'port' | 'user' | 'password' | 'db' | 'compress' | 'auto-reconnect' | 'reset' | 'fail-readonly'
|
||||
/// <value> == [~;]*
|
||||
///
|
||||
/// The following settings are supported:
|
||||
@ -61,6 +61,9 @@ public:
|
||||
/// - character-set: connection character set (default: utf8)
|
||||
/// - reset: reset connection when returned to SessionPool by calling
|
||||
/// mysql_reset_connection().
|
||||
/// - fail-readonly: if set to true, the session will fail
|
||||
/// if the database becomes read-only. This corresponds to
|
||||
/// setFailIfInnoReadOnly(true).
|
||||
///
|
||||
/// Warning: Due to a bug in MySQL, resetting the connection with mysql_reset_connection()
|
||||
/// could change the character encoding used for the connection. Therefore the
|
||||
|
@ -92,6 +92,7 @@ void SessionImpl::open(const std::string& connect)
|
||||
options["secure-auth"] = "";
|
||||
options["character-set"] = "utf8";
|
||||
options["reset"] = "";
|
||||
options["fail-readonly"] = "";
|
||||
|
||||
const std::string& connString = connectionString();
|
||||
for (std::string::const_iterator start = connString.begin();;)
|
||||
@ -153,6 +154,13 @@ void SessionImpl::open(const std::string& connect)
|
||||
else if (!options["reset"].empty())
|
||||
throw MySQLException("create session: specify correct reset option (true or false)");
|
||||
|
||||
if (options["fail-readonly"] == "true")
|
||||
_failIfInnoReadOnly = true;
|
||||
else if (options["fail-readonly"] == "false")
|
||||
_failIfInnoReadOnly = false;
|
||||
else if (!options["fail-readonly"].empty())
|
||||
throw MySQLException("create session: specify correct fail-readonly option (true or false)");
|
||||
|
||||
// Real connect
|
||||
_handle.connect(options["host"].c_str(),
|
||||
options["user"].c_str(),
|
||||
|
@ -753,8 +753,6 @@ private:
|
||||
|
||||
setParamSetSize(length);
|
||||
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_DATE_STRUCT);
|
||||
|
||||
if (_vecLengthIndicator.size() <= pos)
|
||||
{
|
||||
_vecLengthIndicator.resize(pos + 1, 0);
|
||||
@ -803,8 +801,6 @@ private:
|
||||
|
||||
setParamSetSize(val.size());
|
||||
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIME_STRUCT);
|
||||
|
||||
if (_vecLengthIndicator.size() <= pos)
|
||||
{
|
||||
_vecLengthIndicator.resize(pos + 1, 0);
|
||||
@ -854,8 +850,6 @@ private:
|
||||
|
||||
setParamSetSize(length);
|
||||
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIMESTAMP_STRUCT);
|
||||
|
||||
if (_vecLengthIndicator.size() <= pos)
|
||||
{
|
||||
_vecLengthIndicator.resize(pos + 1, 0);
|
||||
@ -905,8 +899,6 @@ private:
|
||||
|
||||
setParamSetSize(length);
|
||||
|
||||
SQLINTEGER size = SQL_NULL_DATA;
|
||||
|
||||
if (_vecLengthIndicator.size() <= pos)
|
||||
{
|
||||
_vecLengthIndicator.resize(pos + 1, 0);
|
||||
|
@ -128,7 +128,7 @@ public:
|
||||
std::cout << std::endl << "WebSocket connection established." << std::endl << PROMPT;
|
||||
|
||||
char buffer[1024];
|
||||
int n, count = 0;
|
||||
int n;
|
||||
do
|
||||
{
|
||||
n = _pWS->receiveFrame(buffer, sizeof(buffer), _flags);
|
||||
|
@ -151,52 +151,6 @@ static const unsigned char padding[128] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
temp2 = S642(a) + F640(a,b,c); \
|
||||
d += temp1; h = temp1 + temp2; \
|
||||
}
|
||||
#ifdef POCO_ARCH_BIG_ENDIAN
|
||||
#ifndef GET_UINT32
|
||||
#define GET_UINT32(n,b,i) \
|
||||
do { \
|
||||
(n) = ( (Poco::UInt32) (b)[(i) ] ) \
|
||||
| ( (Poco::UInt32) (b)[(i) + 1] << 8 ) \
|
||||
| ( (Poco::UInt32) (b)[(i) + 2] << 16 ) \
|
||||
| ( (Poco::UInt32) (b)[(i) + 3] << 24 ); \
|
||||
} while( 0 )
|
||||
#endif
|
||||
#ifndef PUT_UINT32
|
||||
#define PUT_UINT32(n,b,i) \
|
||||
do { \
|
||||
(b)[(i) ] = (unsigned char) ( (n) ); \
|
||||
(b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \
|
||||
(b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \
|
||||
(b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \
|
||||
} while( 0 )
|
||||
#endif
|
||||
#ifndef GET_UINT64
|
||||
#define GET_UINT64(n,b,i) \
|
||||
{ \
|
||||
(n) = ( (Poco::UInt64) (b)[(i) ] ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 1] << 8 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 2] << 16 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 3] << 24 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 4] << 32 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 5] << 40 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 6] << 48 ) \
|
||||
| ( (Poco::UInt64) (b)[(i) + 7] << 56 ); \
|
||||
}
|
||||
#endif
|
||||
#ifndef PUT_UINT64
|
||||
#define PUT_UINT64(n,b,i) \
|
||||
{ \
|
||||
(b)[(i) ] = (unsigned char) ( (n) ); \
|
||||
(b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \
|
||||
(b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \
|
||||
(b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \
|
||||
(b)[(i) + 4] = (unsigned char) ( (n) >> 32 ); \
|
||||
(b)[(i) + 5] = (unsigned char) ( (n) >> 40 ); \
|
||||
(b)[(i) + 6] = (unsigned char) ( (n) >> 48 ); \
|
||||
(b)[(i) + 7] = (unsigned char) ( (n) >> 56 ); \
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
#ifndef GET_UINT32
|
||||
#define GET_UINT32(n,b,i) \
|
||||
do { \
|
||||
@ -241,7 +195,6 @@ do { \
|
||||
(b)[(i) + 7] = (unsigned char) ( (n) ); \
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
SHA2Engine::SHA2Engine(ALGORITHM algorithm):
|
||||
|
@ -124,7 +124,7 @@ int UTF16Encoding::convert(const unsigned char* bytes) const
|
||||
|
||||
if (_flipBytes)
|
||||
{
|
||||
ByteOrder::flipBytes(uc);
|
||||
uc = ByteOrder::flipBytes(uc);
|
||||
}
|
||||
|
||||
if (uc >= 0xd800 && uc < 0xdc00)
|
||||
@ -136,7 +136,7 @@ int UTF16Encoding::convert(const unsigned char* bytes) const
|
||||
|
||||
if (_flipBytes)
|
||||
{
|
||||
ByteOrder::flipBytes(uc2);
|
||||
uc2 = ByteOrder::flipBytes(uc2);
|
||||
}
|
||||
if (uc2 >= 0xdc00 && uc2 < 0xe000)
|
||||
{
|
||||
@ -202,7 +202,9 @@ int UTF16Encoding::queryConvert(const unsigned char* bytes, int length) const
|
||||
*p++ = *bytes++;
|
||||
*p++ = *bytes++;
|
||||
if (_flipBytes)
|
||||
ByteOrder::flipBytes(uc);
|
||||
{
|
||||
uc = ByteOrder::flipBytes(uc);
|
||||
}
|
||||
if (uc >= 0xd800 && uc < 0xdc00)
|
||||
{
|
||||
if (length >= 4)
|
||||
@ -212,7 +214,9 @@ int UTF16Encoding::queryConvert(const unsigned char* bytes, int length) const
|
||||
*p++ = *bytes++;
|
||||
*p++ = *bytes++;
|
||||
if (_flipBytes)
|
||||
ByteOrder::flipBytes(uc2);
|
||||
{
|
||||
uc2 = ByteOrder::flipBytes(uc2);
|
||||
}
|
||||
if (uc2 >= 0xdc00 && uc < 0xe000)
|
||||
{
|
||||
ret = ((uc & 0x3ff) << 10) + (uc2 & 0x3ff) + 0x10000;
|
||||
|
@ -126,7 +126,7 @@ int UTF32Encoding::convert(const unsigned char* bytes) const
|
||||
|
||||
if (_flipBytes)
|
||||
{
|
||||
ByteOrder::flipBytes(uc);
|
||||
uc = ByteOrder::flipBytes(uc);
|
||||
}
|
||||
|
||||
return uc;
|
||||
@ -161,7 +161,9 @@ int UTF32Encoding::queryConvert(const unsigned char* bytes, int length) const
|
||||
*p++ = *bytes++;
|
||||
*p++ = *bytes++;
|
||||
if (_flipBytes)
|
||||
ByteOrder::flipBytes(uc);
|
||||
{
|
||||
uc = ByteOrder::flipBytes(uc);
|
||||
}
|
||||
return uc;
|
||||
}
|
||||
|
||||
|
@ -108,6 +108,9 @@ public:
|
||||
///
|
||||
/// Returns the number of bytes sent, which may be
|
||||
/// less than the number of bytes specified.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for send() like MSG_DONTROUTE.
|
||||
|
||||
int sendBytes(const SocketBufVec& buffer, int flags = 0);
|
||||
/// Sends the contents of the given buffers through
|
||||
@ -115,22 +118,34 @@ public:
|
||||
///
|
||||
/// Returns the number of bytes sent, which may be
|
||||
/// less than the number of bytes specified.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for send() like MSG_DONTROUTE.
|
||||
|
||||
int receiveBytes(void* buffer, int length, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
/// in buffer. Up to length bytes are received.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for recv() like MSG_PEEK.
|
||||
|
||||
int receiveBytes(SocketBufVec& buffer, int flags = 0);
|
||||
/// Receives data from the socket and stores it in buffers.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for recv() like MSG_PEEK.
|
||||
|
||||
int receiveBytes(Poco::Buffer<char>& buffer, int flags = 0, const Poco::Timespan& timeout = 100000);
|
||||
/// Receives data from the socket and stores it in buffers.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for recv() like MSG_PEEK.
|
||||
|
||||
int sendTo(const void* buffer, int length, const SocketAddress& address, int flags = 0);
|
||||
/// Sends the contents of the given buffer through
|
||||
@ -138,6 +153,9 @@ public:
|
||||
///
|
||||
/// Returns the number of bytes sent, which may be
|
||||
/// less than the number of bytes specified.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for sendto() like MSG_DONTROUTE.
|
||||
|
||||
int sendTo(const SocketBufVec& buffers, const SocketAddress& address, int flags = 0);
|
||||
/// Sends the contents of the given buffers through
|
||||
@ -145,6 +163,9 @@ public:
|
||||
///
|
||||
/// Returns the number of bytes sent, which may be
|
||||
/// less than the number of bytes specified.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for sendto() like MSG_DONTROUTE.
|
||||
|
||||
int receiveFrom(void* buffer, int length, SocketAddress& address, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
@ -152,6 +173,9 @@ public:
|
||||
/// Stores the address of the sender in address.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for recvfrom() like MSG_PEEK.
|
||||
|
||||
int receiveFrom(void* buffer, int length, struct sockaddr** ppSA, poco_socklen_t** ppSALen, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
@ -160,6 +184,9 @@ public:
|
||||
/// ppSA, and the length of native address in ppSALen.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for recvfrom() like MSG_PEEK.
|
||||
|
||||
int receiveFrom(SocketBufVec& buffers, SocketAddress& address, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
@ -168,6 +195,9 @@ public:
|
||||
/// Stores the address of the sender in address.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for recvfrom() like MSG_PEEK.
|
||||
|
||||
int receiveFrom(SocketBufVec& buffers, struct sockaddr** ppSA, poco_socklen_t** ppSALen, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
@ -176,6 +206,9 @@ public:
|
||||
/// ppSA, and the length of native address in ppSALen.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for recvfrom() like MSG_PEEK.
|
||||
|
||||
void setBroadcast(bool flag);
|
||||
/// Sets the value of the SO_BROADCAST socket option.
|
||||
|
@ -106,6 +106,9 @@ public:
|
||||
///
|
||||
/// Certain socket implementations may also return a negative
|
||||
/// value denoting a certain condition.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for send() like MSG_OOB.
|
||||
|
||||
int sendBytes(const SocketBufVec& buffer, int flags = 0);
|
||||
/// Sends the contents of the given buffers through
|
||||
@ -113,6 +116,9 @@ public:
|
||||
///
|
||||
/// Returns the number of bytes sent, which may be
|
||||
/// less than the number of bytes specified.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for send() like MSG_OOB.
|
||||
|
||||
int sendBytes(Poco::FIFOBuffer& buffer);
|
||||
/// Sends the contents of the given buffer through
|
||||
@ -126,6 +132,9 @@ public:
|
||||
///
|
||||
/// Certain socket implementations may also return a negative
|
||||
/// value denoting a certain condition.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for send() like MSG_OOB.
|
||||
|
||||
int receiveBytes(void* buffer, int length, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
@ -138,16 +147,25 @@ public:
|
||||
/// Throws a TimeoutException if a receive timeout has
|
||||
/// been set and nothing is received within that interval.
|
||||
/// Throws a NetException (or a subclass) in case of other errors.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for recv() like MSG_OOB, MSG_PEEK or MSG_WAITALL.
|
||||
|
||||
int receiveBytes(SocketBufVec& buffer, int flags = 0);
|
||||
/// Receives data from the socket and stores it in buffers.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for recv() like MSG_OOB, MSG_PEEK or MSG_WAITALL.
|
||||
|
||||
int receiveBytes(Poco::Buffer<char>& buffer, int flags = 0, const Poco::Timespan& timeout = 100000);
|
||||
/// Receives data from the socket and stores it in buffers.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
///
|
||||
/// The flags parameter can be used to pass system-defined flags
|
||||
/// for recv() like MSG_OOB, MSG_PEEK or MSG_WAITALL.
|
||||
|
||||
int receiveBytes(Poco::FIFOBuffer& buffer);
|
||||
/// Receives data from the socket and stores it
|
||||
|
@ -51,6 +51,7 @@ void MulticastSocketTest::testMulticast()
|
||||
{
|
||||
MulticastEchoServer echoServer;
|
||||
MulticastSocket ms(SocketAddress::IPv4);
|
||||
ms.setReceiveTimeout(Poco::Timespan(5, 0));
|
||||
int n = ms.sendTo("hello", 5, echoServer.group());
|
||||
assertTrue (n == 5);
|
||||
char buffer[256];
|
||||
|
@ -14,3 +14,4 @@ N7CppUnit10TestCallerI9TimerTestEE.testTimer
|
||||
N7CppUnit10TestCallerI15FileChannelTestEE.testPurgeAge
|
||||
N7CppUnit10TestCallerI8FileTestEE.testFileAttributes2
|
||||
N7CppUnit10TestCallerI14ICMPSocketTestEE.testSendToReceiveFrom
|
||||
N7CppUnit10TestCallerI22HTTPSClientSessionTestEE.testCachedSession
|
||||
|
@ -13,10 +13,14 @@ AAAIntroduction
|
||||
- GH #2791: allow pre-allocation of the buffer in Poco::LogStreamBuf.
|
||||
- GH #2816: Modernise TLS configuration
|
||||
- GH #2818: Add getSpecifiedPort() method in Poco::URI.
|
||||
- GH #2909: Test failures on s390x architecture with 1.10.0
|
||||
- GH #2911: Poco::UTF16Encoding and Poco::UTF32Encoding byte order conversion bug
|
||||
- GH #2912: Poco::SHA2Engine computes incorrect hash on big-endian systems
|
||||
- MySQL: resetting the session when putting it back into a SessionPool is now optional
|
||||
(and disabled by default) due to a bug in MySQL messing up the character encoding when doing so.
|
||||
- Poco::AutoPtr and Poco::SharedPtr now support comparison with nullptr.
|
||||
|
||||
|
||||
!!!Release 1.10.0
|
||||
|
||||
!!Summary of Changes
|
||||
|
@ -1,6 +1,8 @@
|
||||
set -ev
|
||||
osname=`uname`
|
||||
osarch=`uname -m`
|
||||
export POCO_BASE=`pwd`
|
||||
export EXCLUDE_TESTS="Data/MySQL Data/ODBC MongoDB PDF"
|
||||
export PATH=$PATH:.
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.:$POCO_BASE/lib/$osname/$osarch
|
||||
build/script/runtests.sh
|
||||
|
Loading…
Reference in New Issue
Block a user