diff --git a/Net/Net_x64_vs140.vcxproj.filters b/Net/Net_x64_vs140.vcxproj.filters index 1f2cbdb92..9aed2b91e 100644 --- a/Net/Net_x64_vs140.vcxproj.filters +++ b/Net/Net_x64_vs140.vcxproj.filters @@ -1,8 +1,8 @@ - + - {c94a716b-53e1-4386-9dd9-c34b92252f38} + {c94a716b-53e1-4386-9dd9-c34b92252f38} {c19f980f-ac2d-438a-bd97-e0b5e5fa3fab} diff --git a/Net/src/ICMPSocket.cpp b/Net/src/ICMPSocket.cpp index 65a88f92c..ac06c7ee2 100644 --- a/Net/src/ICMPSocket.cpp +++ b/Net/src/ICMPSocket.cpp @@ -102,7 +102,7 @@ Poco::UInt16 ICMPSocket::mtu(const SocketAddress& address, Poco::UInt16 sz) { if (address.family() != IPAddress::IPv4) return 0; - SocketAddress returnAddress; + SocketAddress returnAddress(address); for (; sz >= 68 /*RFC791*/; --sz) { ICMPSocket icmpSocket(address.family(), sz); diff --git a/Net/src/ICMPSocketImpl.cpp b/Net/src/ICMPSocketImpl.cpp index 8ed904440..df086a9c3 100644 --- a/Net/src/ICMPSocketImpl.cpp +++ b/Net/src/ICMPSocketImpl.cpp @@ -68,12 +68,12 @@ int ICMPSocketImpl::receiveFrom(void*, int, SocketAddress& address, int flags) if (ts.isElapsed(_timeout)) throw TimeoutException(); buffer.clear(); SocketAddress respAddr; - rc = SocketImpl::receiveFrom(buffer.begin(), expected, respAddr, flags); + rc = SocketImpl::receiveFrom(buffer.begin(), maxPacketSize, respAddr, flags); if (rc == 0) break; if (respAddr == address) { expected -= rc; - if (expected == 0) + if (expected <= 0) { if (_icmpPacket.validReplyID(buffer.begin(), maxPacketSize)) break; int type = 0, code = 0; diff --git a/Net/src/Socket.cpp b/Net/src/Socket.cpp index 27c679957..ccfac247d 100644 --- a/Net/src/Socket.cpp +++ b/Net/src/Socket.cpp @@ -422,7 +422,7 @@ SocketBuf Socket::makeBuffer(void* buffer, std::size_t length) SocketBuf ret; #if defined(POCO_OS_FAMILY_WINDOWS) ret.buf = reinterpret_cast(buffer); - ret.len = length; + ret.len = static_cast(length); #elif defined(POCO_OS_FAMILY_UNIX) ret.iov_base = buffer; ret.iov_len = length; diff --git a/Net/src/SocketImpl.cpp b/Net/src/SocketImpl.cpp index e6c5dc04e..f184cd27a 100644 --- a/Net/src/SocketImpl.cpp +++ b/Net/src/SocketImpl.cpp @@ -431,7 +431,7 @@ int SocketImpl::receiveBytes(Poco::Buffer& buffer, int flags, const Poco:: do { if (_sockfd == POCO_INVALID_SOCKET) throw InvalidSocketException(); - rc = ::recv(_sockfd, buffer.begin(), buffer.size(), flags); + rc = ::recv(_sockfd, buffer.begin(), static_cast(buffer.size()), flags); } while (_blocking && rc < 0 && lastError() == POCO_EINTR); if (rc < 0) diff --git a/Net/testsuite/src/ICMPSocketTest.cpp b/Net/testsuite/src/ICMPSocketTest.cpp index 42729f44e..a8b2a14e6 100644 --- a/Net/testsuite/src/ICMPSocketTest.cpp +++ b/Net/testsuite/src/ICMPSocketTest.cpp @@ -52,6 +52,7 @@ void ICMPSocketTest::testAssign() ICMPSocket s2(s1); } + void ICMPSocketTest::testSendToReceiveFrom() { ICMPSocket ss(IPAddress::IPv4); @@ -64,12 +65,9 @@ void ICMPSocketTest::testSendToReceiveFrom() ss.receiveFrom(sa); fail("must throw"); } - catch(ICMPException&) - { - } - catch(TimeoutException&) - { - } + catch (ICMPException&) { } + catch (TimeoutException&) { } + catch (Exception&) { } ss.sendTo(sa); ss.receiveFrom(sa); diff --git a/openssl b/openssl index 0c6d16ec8..26b1673ca 160000 --- a/openssl +++ b/openssl @@ -1 +1 @@ -Subproject commit 0c6d16ec85f80ea3ce05a8f2ff52c1b3ba240a41 +Subproject commit 26b1673caad94a702b6d694f48f917a283b30777