Permalink
Browse files

Sync with upstream.

  • Loading branch information...
2 parents 03b0c93 + b898efd commit 37b6e9fe00dcb037a3e8bd1f804f7274f0bd9646 @pprindeville committed Jan 8, 2013
View
@@ -2,4 +2,5 @@ language: cpp
compiler:
- gcc
- clang
-script: cmake .
+script: ./configure --omit=Data & make -s
+
View
@@ -1,6 +1,6 @@
This is the changelog file for the POCO C++ Libraries.
-Release 1.5.1 (2012-12-25)
+Release 1.5.1 (2013-01-11)
==========================
- using double-conversion library for floating-point numeric/string conversions
- added Poco::istring (case-insensitive string) and Poco::isubstr
@@ -32,10 +32,17 @@ Release 1.5.1 (2012-12-25)
- improved SQLite execute() return (affected rows) value and added tests
- added SQLite::Utility::isThreadSafe() function
- added SQLite::Utility::setThreadMode(int mode) function
+- fixed GH #36: 'distclean' requires 3 traversals of project tree
- fixed GH #41: Buffer::resize crash
- fixed GH #42: Linux unbundled builds don't link
- fixed GH #44: Problems with win x64 build
-
+- fixed GH #46: 1.5.1 build fails on OS X when using libc++
+- fixed GH #48: Need getArgs() accessor to Util::Application to retrieve start-up arguments
+- fixed GH #49: NetworkInterface::list doesn't return MAC addresses
+- fixed GH #51: Android should use isfinite, isinf, isnan and signbit from the std namespace
+- fixed GH #53: JSON unicode fixes and running tests on invalid unicode JSON
+- added ParallelAcceptor and ParallelReactor classes
+- added EOF and error to FIFOBuffer
Release 1.5.0 (2012-10-14)
==========================
@@ -544,6 +544,9 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\src\Error.cpp">
+ </File>
+ <File
RelativePath=".\src\Exception.cpp">
</File>
<File
@@ -763,13 +766,13 @@
RelativePath=".\src\NumberParser.cpp">
</File>
<File
- RelativePath=".\src\RefCountedObject.cpp">
+ RelativePath=".\src\NumericString.cpp">
</File>
<File
- RelativePath=".\src\String.cpp">
+ RelativePath=".\src\RefCountedObject.cpp">
</File>
<File
- RelativePath=".\src\NumericString.cpp">
+ RelativePath=".\src\String.cpp">
</File>
<File
RelativePath=".\src\StringTokenizer.cpp">
@@ -839,6 +842,9 @@
RelativePath=".\include\Poco\Environment_WIN32U.h">
</File>
<File
+ RelativePath=".\include\Poco\Error.h">
+ </File>
+ <File
RelativePath=".\include\Poco\Exception.h">
</File>
<File
@@ -265,15 +265,15 @@ void CoreTest::testBuffer()
assert ( !std::memcmp(g.begin(), "hellohello", 10) );
char h[10];
- Buffer<char> i(h, 10);
+ Buffer<char> buf(h, 10);
try
{
- i.append("hello", 5);
+ buf.append("hello", 5);
fail ("must fail");
}
catch (InvalidAccessException&) { }
- i.assign("hello", 5);
+ buf.assign("hello", 5);
assert ( !std::memcmp(&h[0], "hello", 5) );
const char j[10] = "hello";
@@ -656,13 +656,13 @@ void CoreTest::testFIFOBufferChar()
assert(1 == _notToWritable);
assert(1 == _writableToNot);
- const char c[3] = {'4', '5', '6' };
+ const char arr[3] = {'4', '5', '6' };
try
{
- f.copy(&c[0], 8);
+ f.copy(&arr[0], 8);
} catch (InvalidAccessException&) { }
- f.copy(&c[0], 3);
+ f.copy(&arr[0], 3);
assert(7 == _notToReadable);
assert(6 == _readableToNot);
assert(1 == _notToWritable);
@@ -673,7 +673,7 @@ void CoreTest::testFIFOBufferChar()
assert (4 == f.available());
const char d[4] = {'7', '8', '9', '0' };
- f.copy(&c[0], 4);
+ f.copy(&arr[0], 4);
assert(7 == _notToReadable);
assert(6 == _readableToNot);
assert(1 == _notToWritable);
@@ -686,7 +686,7 @@ void CoreTest::testFIFOBufferChar()
try
{
- f.copy(&c[0], 1);
+ f.copy(&arr[0], 1);
} catch (InvalidAccessException&) { }
f.drain(1);
View
@@ -234,4 +234,4 @@ clean:
distclean:
rm -rf $(POCO_BUILD)/lib
- find $(POCO_BUILD) \( -name obj -o -name .dep -o -name bin \) -type d -print0 | xargs -0 rm -rf
+ find $(POCO_BUILD) \( -name bin -o -name .dep -o -name obj \) -type d -print0 | xargs -0 rm -rf
@@ -141,7 +141,7 @@ class Net_API FTPClientSession
void logout();
void close();
- /// Sends a QUIT command and closes the connection to the server.
+ /// Sends a QUIT command and closes the connection to the server.
///
/// Throws a FTPException in case of a FTP-specific error, or a
/// NetException in case of a general network communication failure.
@@ -179,14 +179,14 @@ class Net_API IPAddress
/// For dealing with IPv4 compatible addresses in a mixed environment,
/// a special syntax is available: x:x:x:x:x:x:d.d.d.d, where the 'x's are the
/// hexadecimal values of the six high-order 16-bit pieces of the address,
- /// and the 'd's are the decimal values of the four low-order 8-bit pieces of the
- /// standard IPv4 representation address. Example: ::FFFF:192.168.1.120
- ///
- /// If an IPv6 address contains a non-zero scope identifier, it is added
- /// to the string, delimited by a percent character. On Windows platforms,
- /// the numeric value (which specifies an interface index) is directly
- /// appended. On Unix platforms, the name of the interface corresponding
- /// to the index (interpretation of the scope identifier) is added.
+ /// and the 'd's are the decimal values of the four low-order 8-bit pieces of the
+ /// standard IPv4 representation address. Example: ::FFFF:192.168.1.120
+ ///
+ /// If an IPv6 address contains a non-zero scope identifier, it is added
+ /// to the string, delimited by a percent character. On Windows platforms,
+ /// the numeric value (which specifies an interface index) is directly
+ /// appended. On Unix platforms, the name of the interface corresponding
+ /// to the index (interpretation of the scope identifier) is added.
bool isWildcard() const;
/// Returns true iff the address is a wildcard (all zero)
@@ -290,19 +290,30 @@ class Net_API NetworkInterface
/// member of the pair.
protected:
- NetworkInterface(const std::string& name, const std::string& displayName, const IPAddress& address, unsigned index);
+ NetworkInterface(const std::string& name, const std::string& displayName, const IPAddress& address, unsigned index, MACAddress* pMACAddress = 0);
/// Creates the NetworkInterface.
- NetworkInterface(const std::string& name, const std::string& displayName, unsigned index);
+ NetworkInterface(const std::string& name, const std::string& displayName, unsigned index, MACAddress* pMACAddress = 0);
/// Creates the NetworkInterface.
- NetworkInterface(const std::string& name, const IPAddress& address, unsigned index);
+ NetworkInterface(const std::string& name, const IPAddress& address, unsigned index, MACAddress* pMACAddress = 0);
/// Creates the NetworkInterface.
- NetworkInterface(const std::string& name, const std::string& displayName, const IPAddress& address, const IPAddress& subnetMask, const IPAddress& broadcastAddress, unsigned index);
+ NetworkInterface(const std::string& name,
+ const std::string& displayName,
+ const IPAddress& address,
+ const IPAddress& subnetMask,
+ const IPAddress& broadcastAddress,
+ unsigned index,
+ MACAddress* pMACAddress = 0);
/// Creates the NetworkInterface.
- NetworkInterface(const std::string& name, const IPAddress& address, const IPAddress& subnetMask, const IPAddress& broadcastAddress, unsigned index);
+ NetworkInterface(const std::string& name,
+ const IPAddress& address,
+ const IPAddress& subnetMask,
+ const IPAddress& broadcastAddress,
+ unsigned index,
+ MACAddress* pMACAddress = 0);
/// Creates the NetworkInterface.
IPAddress interfaceNameToAddress(const std::string& interfaceName) const;
View
@@ -84,7 +84,7 @@ HostEntry DNS::hostByName(const std::string& hostname)
return HostEntry(he);
}
#endif
- error(lastError(), hostname); // will throw an appropriate exception
+ error(lastError(), hostname); // will throw an appropriate exception
throw NetException(); // to silence compiler
}
View
@@ -133,9 +133,9 @@ HostEntry& HostEntry::operator = (const HostEntry& entry)
{
if (&entry != this)
{
- _name = entry._name;
- _aliases = entry._aliases;
- _addresses = entry._addresses;
+ _name = entry._name;
+ _aliases = entry._aliases;
+ _addresses = entry._addresses;
}
return *this;
}
@@ -93,9 +93,15 @@ class NetworkInterfaceImpl: public Poco::RefCountedObject
typedef NetworkInterface::Type Type;
NetworkInterfaceImpl(unsigned index);
- NetworkInterfaceImpl(const std::string& name, const std::string& displayName, const IPAddress& address, unsigned index);
- NetworkInterfaceImpl(const std::string& name, const std::string& displayName, unsigned index = 0);
- NetworkInterfaceImpl(const std::string& name, const std::string& displayName, const IPAddress& address, const IPAddress& subnetMask, const IPAddress& broadcastAddress, unsigned index);
+ NetworkInterfaceImpl(const std::string& name, const std::string& displayName, const IPAddress& address, unsigned index, NetworkInterface::MACAddress* pMACAddress = 0);
+ NetworkInterfaceImpl(const std::string& name, const std::string& displayName, unsigned index = 0, NetworkInterface::MACAddress* pMACAddress = 0);
+ NetworkInterfaceImpl(const std::string& name,
+ const std::string& displayName,
+ const IPAddress& address,
+ const IPAddress& subnetMask,
+ const IPAddress& broadcastAddress,
+ unsigned index,
+ NetworkInterface::MACAddress* pMACAddress = 0);
unsigned index() const;
const std::string& name() const;
@@ -172,7 +178,7 @@ NetworkInterfaceImpl::NetworkInterfaceImpl(unsigned index):
}
-NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name, const std::string& displayName, const IPAddress& address, unsigned index):
+NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name, const std::string& displayName, const IPAddress& address, unsigned index, NetworkInterface::MACAddress* pMACAddress):
_name(name),
_displayName(displayName),
_index(index),
@@ -186,10 +192,11 @@ NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name, const std::s
{
_addressList.push_back(AddressTuple(address, IPAddress(), IPAddress()));
setPhyParams();
+ if (pMACAddress) setMACAddress(*pMACAddress);
}
-NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name, const std::string& displayName, unsigned index):
+NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name, const std::string& displayName, unsigned index, NetworkInterface::MACAddress* pMACAddress):
_name(name),
_displayName(displayName),
_index(index),
@@ -202,10 +209,17 @@ NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name, const std::s
_mtu(0)
{
setPhyParams();
+ if (pMACAddress) setMACAddress(*pMACAddress);
}
-NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name, const std::string& displayName, const IPAddress& address, const IPAddress& subnetMask, const IPAddress& broadcastAddress, unsigned index):
+NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name,
+ const std::string& displayName,
+ const IPAddress& address,
+ const IPAddress& subnetMask,
+ const IPAddress& broadcastAddress,
+ unsigned index,
+ NetworkInterface::MACAddress* pMACAddress):
_name(name),
_displayName(displayName),
_index(index),
@@ -219,6 +233,7 @@ NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name, const std::s
{
_addressList.push_back(AddressTuple(address, subnetMask, broadcastAddress));
setPhyParams();
+ if (pMACAddress) setMACAddress(*pMACAddress);
}
@@ -502,8 +517,11 @@ inline void NetworkInterfaceImpl::addAddress(const IPAddress& addr)
_addressList.push_back(addr);
}
+
inline void NetworkInterfaceImpl::setMACAddress(const NetworkInterface::MACAddress& addr)
{
+
+
_macAddress = addr;
}
@@ -537,32 +555,43 @@ NetworkInterface::NetworkInterface(const NetworkInterface& interfc):
}
-NetworkInterface::NetworkInterface(const std::string& name, const std::string& displayName, const IPAddress& address, unsigned index):
- _pImpl(new NetworkInterfaceImpl(name, displayName, address, index))
+NetworkInterface::NetworkInterface(const std::string& name, const std::string& displayName, const IPAddress& address, unsigned index, MACAddress* pMACAddress):
+ _pImpl(new NetworkInterfaceImpl(name, displayName, address, index, pMACAddress))
{
}
-NetworkInterface::NetworkInterface(const std::string& name, const std::string& displayName, unsigned index):
- _pImpl(new NetworkInterfaceImpl(name, displayName, index))
+NetworkInterface::NetworkInterface(const std::string& name, const std::string& displayName, unsigned index, MACAddress* pMACAddress):
+ _pImpl(new NetworkInterfaceImpl(name, displayName, index, pMACAddress))
{
}
-NetworkInterface::NetworkInterface(const std::string& name, const IPAddress& address, unsigned index):
- _pImpl(new NetworkInterfaceImpl(name, name, address, index))
+NetworkInterface::NetworkInterface(const std::string& name, const IPAddress& address, unsigned index, MACAddress* pMACAddress):
+ _pImpl(new NetworkInterfaceImpl(name, name, address, index, pMACAddress))
{
}
-NetworkInterface::NetworkInterface(const std::string& name, const std::string& displayName, const IPAddress& address, const IPAddress& subnetMask, const IPAddress& broadcastAddress, unsigned index):
- _pImpl(new NetworkInterfaceImpl(name, displayName, address, subnetMask, broadcastAddress, index))
+NetworkInterface::NetworkInterface(const std::string& name,
+ const std::string& displayName,
+ const IPAddress& address,
+ const IPAddress& subnetMask,
+ const IPAddress& broadcastAddress,
+ unsigned index,
+ MACAddress* pMACAddress):
+ _pImpl(new NetworkInterfaceImpl(name, displayName, address, subnetMask, broadcastAddress, index, pMACAddress))
{
}
-NetworkInterface::NetworkInterface(const std::string& name, const IPAddress& address, const IPAddress& subnetMask, const IPAddress& broadcastAddress, unsigned index):
- _pImpl(new NetworkInterfaceImpl(name, name, address, subnetMask, broadcastAddress, index))
+NetworkInterface::NetworkInterface(const std::string& name,
+ const IPAddress& address,
+ const IPAddress& subnetMask,
+ const IPAddress& broadcastAddress,
+ unsigned index,
+ MACAddress* pMACAddress):
+ _pImpl(new NetworkInterfaceImpl(name, name, address, subnetMask, broadcastAddress, index, pMACAddress))
{
}
@@ -834,6 +863,7 @@ NetworkInterface::List NetworkInterface::list(bool ipOnly, bool upOnly)
int index = it->second.index();
std::string name = it->second.name();
std::string displayName = it->second.displayName();
+ NetworkInterface::MACAddress mac = it->second.macAddress();
typedef NetworkInterface::AddressList List;
const List& ipList = it->second.addressList();
@@ -845,11 +875,11 @@ NetworkInterface::List NetworkInterface::list(bool ipOnly, bool upOnly)
IPAddress mask = ipIt->get<NetworkInterface::SUBNET_MASK>();
NetworkInterface ni;
if (mask.isWildcard())
- ni = NetworkInterface(name, displayName, addr, index);
+ ni = NetworkInterface(name, displayName, addr, index, &mac);
else
{
IPAddress broadcast = ipIt->get<NetworkInterface::BROADCAST_ADDRESS>();
- ni = NetworkInterface(name, displayName, addr, mask, broadcast, index);
+ ni = NetworkInterface(name, displayName, addr, mask, broadcast, index, &mac);
}
list.push_back(ni);
View
@@ -466,13 +466,13 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
while (rc < 0 && lastError() == POCO_EINTR);
::close(epollfd);
- if (rc < 0) error();
- return rc > 0;
+ if (rc < 0) error();
+ return rc > 0;
#elif defined(POCO_HAVE_FD_POLL)
pollfd pollBuf;
-
+
memset(&pollBuf, 0, sizeof(pollfd));
pollBuf.fd = _sockfd;
if (mode & SELECT_READ) pollBuf.events |= POLLIN;
Oops, something went wrong.

0 comments on commit 37b6e9f

Please sign in to comment.