diff --git a/Foundation/include/Poco/Format.h b/Foundation/include/Poco/Format.h index 2ee578d92..b80a90d0e 100644 --- a/Foundation/include/Poco/Format.h +++ b/Foundation/include/Poco/Format.h @@ -1,7 +1,7 @@ // // Format.h // -// $Id: //poco/1.3/Foundation/include/Poco/Format.h#2 $ +// $Id: //poco/1.3/Foundation/include/Poco/Format.h#3 $ // // Library: Foundation // Package: Core @@ -109,7 +109,7 @@ std::string Foundation_API format(const std::string& fmt, const Any& value); /// * l argument is long (d, i), unsigned long (o, u, x, X) or long double (e, E, f, g, G) /// * L argument is long long (d, i), unsigned long long (o, u, x, X) /// * h argument is short (d, i), unsigned short (o, u, x, X) or float (e, E, f, g, G) - /// * * argument is any signed or unsigned integer (d, i, o, x, X) + /// * ? argument is any signed or unsigned int, short, long, or 64-bit integer (d, i, o, x, X) /// /// The width argument is a nonnegative decimal integer controlling the minimum number of characters printed. /// If the number of characters in the output value is less than the specified width, blanks or diff --git a/Foundation/src/Format.cpp b/Foundation/src/Format.cpp index 285275e1f..4d32cb5c9 100644 --- a/Foundation/src/Format.cpp +++ b/Foundation/src/Format.cpp @@ -1,7 +1,7 @@ // // Format.cpp // -// $Id: //poco/1.3/Foundation/src/Format.cpp#2 $ +// $Id: //poco/1.3/Foundation/src/Format.cpp#3 $ // // Library: Foundation // Package: Core @@ -113,7 +113,7 @@ namespace case 'l': case 'h': case 'L': - case '*': mod = *itFmt++; break; + case '?': mod = *itFmt++; break; } } return mod; @@ -186,7 +186,7 @@ namespace case 'l': str << AnyCast(*itVal++); break; case 'L': str << AnyCast(*itVal++); break; case 'h': str << AnyCast(*itVal++); break; - case '*': writeAnyInt(str, *itVal++); break; + case '?': writeAnyInt(str, *itVal++); break; default: str << AnyCast(*itVal++); break; } break; @@ -199,7 +199,7 @@ namespace case 'l': str << AnyCast(*itVal++); break; case 'L': str << AnyCast(*itVal++); break; case 'h': str << AnyCast(*itVal++); break; - case '*': writeAnyInt(str, *itVal++); break; + case '?': writeAnyInt(str, *itVal++); break; default: str << AnyCast(*itVal++); break; } break; diff --git a/Foundation/testsuite/src/FormatTest.cpp b/Foundation/testsuite/src/FormatTest.cpp index caefc689c..7ea2da3cd 100644 --- a/Foundation/testsuite/src/FormatTest.cpp +++ b/Foundation/testsuite/src/FormatTest.cpp @@ -1,7 +1,7 @@ // // FormatTest.cpp // -// $Id: //poco/1.3/Foundation/testsuite/src/FormatTest.cpp#2 $ +// $Id: //poco/1.3/Foundation/testsuite/src/FormatTest.cpp#3 $ // // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. // All rights reserved. @@ -214,55 +214,55 @@ void FormatTest::testInt() void FormatTest::testAnyInt() { char c = 42; - std::string s(format("%*i", c)); + std::string s(format("%?i", c)); assert (s == "42"); signed char sc = -42; - s = format("%*i", sc); + s = format("%?i", sc); assert (s == "-42"); unsigned char uc = 65; - s = format("%*i", uc); + s = format("%?i", uc); assert (s == "65"); short ss = -134; - s = format("%*i", ss); + s = format("%?i", ss); assert (s == "-134"); unsigned short us = 200; - s = format("%*i", us); + s = format("%?i", us); assert (s == "200"); int i = -12345; - s = format("%*i", i); + s = format("%?i", i); assert (s == "-12345"); unsigned ui = 12345; - s = format("%*i", ui); + s = format("%?i", ui); assert (s == "12345"); long l = -54321; - s = format("%*i", l); + s = format("%?i", l); assert (s == "-54321"); unsigned long ul = 54321; - s = format("%*i", ul); + s = format("%?i", ul); assert (s == "54321"); Int64 i64 = -12345678; - s = format("%*i", i64); + s = format("%?i", i64); assert (s == "-12345678"); UInt64 ui64 = 12345678; - s = format("%*i", ui64); + s = format("%?i", ui64); assert (s == "12345678"); ss = 0x42; - s = format("%*x", ss); + s = format("%?x", ss); assert (s == "42"); ss = 042; - s = format("%*o", ss); + s = format("%?o", ss); assert (s == "42"); } diff --git a/Net/src/IPAddress.cpp b/Net/src/IPAddress.cpp index 554d84cda..f696a7c1e 100644 --- a/Net/src/IPAddress.cpp +++ b/Net/src/IPAddress.cpp @@ -1,7 +1,7 @@ // // IPAddress.cpp // -// $Id: //poco/1.3/Net/src/IPAddress.cpp#1 $ +// $Id: //poco/1.3/Net/src/IPAddress.cpp#2 $ // // Library: Net // Package: NetCore @@ -300,7 +300,7 @@ public: } } if (i > 0) result.append(":"); - if (i < 8) result.append(NumberFormatter::formatHex(words[i++])); + if (i < 8) result.append(NumberFormatter::formatHex(ntohs(words[i++]))); } return result; } diff --git a/Net/src/SocketNotifier.cpp b/Net/src/SocketNotifier.cpp index d120d6218..aac39e452 100644 --- a/Net/src/SocketNotifier.cpp +++ b/Net/src/SocketNotifier.cpp @@ -1,7 +1,7 @@ // // SocketNotifier.cpp // -// $Id: //poco/1.3/Net/src/SocketNotifier.cpp#1 $ +// $Id: //poco/1.3/Net/src/SocketNotifier.cpp#2 $ // // Library: Net // Package: Reactor @@ -87,9 +87,20 @@ void SocketNotifier::removeObserver(SocketReactor* pReactor, const Poco::Abstrac void SocketNotifier::dispatch(SocketNotification* pNotification) { + static Socket nullSocket; + pNotification->setSocket(_socket); pNotification->duplicate(); - _nc.postNotification(pNotification); + try + { + _nc.postNotification(pNotification); + } + catch (...) + { + pNotification->setSocket(nullSocket); + throw; + } + pNotification->setSocket(nullSocket); } diff --git a/VERSION b/VERSION index eade51ef6..5157c4bfa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3-20061227 (2006-12-27) +1.3-20070104-ssl (2007-01-04)