mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01:00
fix FTPS win build, license, header guards; fix few warnings
This commit is contained in:
@@ -20,7 +20,9 @@
|
||||
#include "Poco/ErrorHandler.h"
|
||||
#include "Poco/Thread.h"
|
||||
#include "Poco/Exception.h"
|
||||
|
||||
#ifdef max
|
||||
#undef max
|
||||
#endif
|
||||
|
||||
using Poco::FastMutex;
|
||||
using Poco::Exception;
|
||||
@@ -104,7 +106,9 @@ void SocketReactor::run()
|
||||
if (nSockets == 0)
|
||||
{
|
||||
onIdle();
|
||||
Thread::trySleep(_timeout.totalMilliseconds());
|
||||
Timespan::TimeDiff ms = _timeout.totalMilliseconds();
|
||||
poco_assert_dbg(ms <= std::numeric_limits<long>::max());
|
||||
Thread::trySleep(static_cast<long>(ms));
|
||||
}
|
||||
else if (Socket::select(readable, writable, except, _timeout))
|
||||
{
|
||||
|
||||
@@ -207,7 +207,7 @@ int WebSocketImpl::receiveBytes(Poco::Buffer<char>& buffer, int)
|
||||
int payloadLength = receiveHeader(mask, useMask);
|
||||
if (payloadLength <= 0)
|
||||
return payloadLength;
|
||||
int oldSize = buffer.size();
|
||||
int oldSize = static_cast<int>(buffer.size());
|
||||
buffer.resize(oldSize + payloadLength);
|
||||
return receivePayload(buffer.begin() + oldSize, payloadLength, mask, useMask);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ int WebSocketImpl::receiveNBytes(void* buffer, int bytes)
|
||||
|
||||
int WebSocketImpl::receiveSomeBytes(char* buffer, int bytes)
|
||||
{
|
||||
int n = _buffer.size() - _bufferOffset;
|
||||
int n = static_cast<int>(_buffer.size()) - _bufferOffset;
|
||||
if (n > 0)
|
||||
{
|
||||
if (bytes < n) n = bytes;
|
||||
|
||||
Reference in New Issue
Block a user