From 851bd49554293c98047d1c1d0ec19dc99769a731 Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Fri, 22 Dec 2006 09:57:44 +0000 Subject: [PATCH] sources from main repository --- Net/Net_vs71.sln | 12 ++ Net/Net_vs71.vcproj | 101 ++++++++++ Net/Net_vs80.sln | 10 + Net/Net_vs80.vcproj | 148 ++++++++++++++- Net/include/Poco/Net/SMTPClientSession.h | 11 +- Net/include/Poco/Net/TCPServer.h | 15 +- Net/samples/EchoServer/EchoServer_vs71.vcproj | 90 +++++++++ .../HTTPFormServer/HTTPFormServer_vs71.vcproj | 90 +++++++++ .../HTTPLoadTest/HTTPLoadTest_vs71.vcproj | 90 +++++++++ .../HTTPTimeServer/HTTPTimeServer_vs71.vcproj | 90 +++++++++ Net/samples/Mail/Mail_vs71.vcproj | 90 +++++++++ Net/samples/Ping/Ping_vs71.vcproj | 90 +++++++++ Net/samples/TimeServer/TimeServer_vs71.vcproj | 90 +++++++++ Net/samples/dict/dict_vs71.vcproj | 92 +++++++++ Net/samples/dict/src/dict.cpp | 2 +- Net/samples/download/download_vs71.vcproj | 90 +++++++++ Net/samples/httpget/httpget_vs71.vcproj | 90 +++++++++ Net/samples/samples_vs71.sln | 44 +++++ Net/src/MulticastSocket.cpp | 4 +- Net/src/SMTPClientSession.cpp | 23 ++- Net/testsuite/TestSuite_vs71.vcproj | 118 ++++++++++++ Net/testsuite/TestSuite_vs80.vcproj | 179 +++++++++++++++++- 22 files changed, 1554 insertions(+), 15 deletions(-) diff --git a/Net/Net_vs71.sln b/Net/Net_vs71.sln index a46e72c52..bccbba4ce 100644 --- a/Net/Net_vs71.sln +++ b/Net/Net_vs71.sln @@ -11,17 +11,29 @@ EndProject Global GlobalSection(SolutionConfiguration) = preSolution debug_shared = debug_shared + debug_static = debug_static release_shared = release_shared + release_static = release_static + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared.ActiveCfg = debug_shared|Win32 {B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared.Build.0 = debug_shared|Win32 + {B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static.ActiveCfg = debug_static|Win32 + {B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static.Build.0 = debug_static|Win32 {B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared.ActiveCfg = release_shared|Win32 {B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared.Build.0 = release_shared|Win32 + {B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static.ActiveCfg = release_static|Win32 + {B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static.Build.0 = release_static|Win32 {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared.ActiveCfg = debug_shared|Win32 {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared.Build.0 = debug_shared|Win32 + {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static.ActiveCfg = debug_static|Win32 + {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static.Build.0 = debug_static|Win32 {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared.ActiveCfg = release_shared|Win32 {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared.Build.0 = release_shared|Win32 + {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static.ActiveCfg = release_static|Win32 + {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static.Build.0 = release_static|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/Net/Net_vs71.vcproj b/Net/Net_vs71.vcproj index 634a1cb83..727c7fc12 100644 --- a/Net/Net_vs71.vcproj +++ b/Net/Net_vs71.vcproj @@ -138,6 +138,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/Net_vs80.sln b/Net/Net_vs80.sln index f2ad39c76..0bede45e1 100644 --- a/Net/Net_vs80.sln +++ b/Net/Net_vs80.sln @@ -10,17 +10,27 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution debug_shared|Win32 = debug_shared|Win32 + debug_static|Win32 = debug_static|Win32 release_shared|Win32 = release_shared|Win32 + release_static|Win32 = release_static|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.Build.0 = debug_shared|Win32 + {B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static|Win32.ActiveCfg = debug_static|Win32 + {B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static|Win32.Build.0 = debug_static|Win32 {B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.ActiveCfg = release_shared|Win32 {B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.Build.0 = release_shared|Win32 + {B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static|Win32.ActiveCfg = release_static|Win32 + {B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static|Win32.Build.0 = release_static|Win32 {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.Build.0 = debug_shared|Win32 + {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static|Win32.ActiveCfg = debug_static|Win32 + {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static|Win32.Build.0 = debug_static|Win32 {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.ActiveCfg = release_shared|Win32 {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.Build.0 = release_shared|Win32 + {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static|Win32.ActiveCfg = release_static|Win32 + {D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static|Win32.Build.0 = release_static|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Net/Net_vs80.vcproj b/Net/Net_vs80.vcproj index 80660663a..3969a518d 100644 --- a/Net/Net_vs80.vcproj +++ b/Net/Net_vs80.vcproj @@ -1,7 +1,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/include/Poco/Net/SMTPClientSession.h b/Net/include/Poco/Net/SMTPClientSession.h index dcb9d53a3..71313c880 100644 --- a/Net/include/Poco/Net/SMTPClientSession.h +++ b/Net/include/Poco/Net/SMTPClientSession.h @@ -1,7 +1,7 @@ // // SMTPClientSession.h // -// $Id: //poco/1.3/Net/include/Poco/Net/SMTPClientSession.h#1 $ +// $Id: //poco/1.3/Net/include/Poco/Net/SMTPClientSession.h#2 $ // // Library: Net // Package: Mail @@ -94,6 +94,15 @@ public: void login(); /// Calls login(hostname) with the current host name. + void open(); + /// Reads the initial response from the SMTP server. + /// + /// Usually called implicitly through login(), but can + /// also be called explicitly to implement different forms + /// of SMTP authentication. + /// + /// Does nothing if called more than once. + void close(); /// Sends a QUIT command and closes the connection to the server. /// diff --git a/Net/include/Poco/Net/TCPServer.h b/Net/include/Poco/Net/TCPServer.h index ab235effe..805cc8f57 100644 --- a/Net/include/Poco/Net/TCPServer.h +++ b/Net/include/Poco/Net/TCPServer.h @@ -1,7 +1,7 @@ // // TCPServer.h // -// $Id: //poco/1.3/Net/include/Poco/Net/TCPServer.h#1 $ +// $Id: //poco/1.3/Net/include/Poco/Net/TCPServer.h#2 $ // // Library: Net // Package: TCPServer @@ -152,17 +152,20 @@ public: /// Returns the total number of handled connections. int currentConnections() const; - /// Returns the number of currently handled connections. + /// Returns the number of currently handled connections. int maxConcurrentConnections() const; /// Returns the maximum number of concurrently handled connections. int queuedConnections() const; - /// Returns the number of queued connections. + /// Returns the number of queued connections. int refusedConnections() const; /// Returns the number of refused connections. + Poco::UInt16 port() const; + /// Returns the port the server socket listens to + protected: void run(); /// Runs the server. The server will run until @@ -185,6 +188,12 @@ private: }; +inline Poco::UInt16 TCPServer::port() const +{ + return _socket.address().port(); +} + + } } // namespace Poco::Net diff --git a/Net/samples/EchoServer/EchoServer_vs71.vcproj b/Net/samples/EchoServer/EchoServer_vs71.vcproj index 275673e52..f19ecfa8d 100644 --- a/Net/samples/EchoServer/EchoServer_vs71.vcproj +++ b/Net/samples/EchoServer/EchoServer_vs71.vcproj @@ -128,6 +128,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/HTTPFormServer/HTTPFormServer_vs71.vcproj b/Net/samples/HTTPFormServer/HTTPFormServer_vs71.vcproj index e30e20507..4c9bfd39b 100644 --- a/Net/samples/HTTPFormServer/HTTPFormServer_vs71.vcproj +++ b/Net/samples/HTTPFormServer/HTTPFormServer_vs71.vcproj @@ -128,6 +128,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/HTTPLoadTest/HTTPLoadTest_vs71.vcproj b/Net/samples/HTTPLoadTest/HTTPLoadTest_vs71.vcproj index 7529f4d74..85d48d294 100644 --- a/Net/samples/HTTPLoadTest/HTTPLoadTest_vs71.vcproj +++ b/Net/samples/HTTPLoadTest/HTTPLoadTest_vs71.vcproj @@ -128,6 +128,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/HTTPTimeServer/HTTPTimeServer_vs71.vcproj b/Net/samples/HTTPTimeServer/HTTPTimeServer_vs71.vcproj index 31b62cebd..22006561e 100644 --- a/Net/samples/HTTPTimeServer/HTTPTimeServer_vs71.vcproj +++ b/Net/samples/HTTPTimeServer/HTTPTimeServer_vs71.vcproj @@ -128,6 +128,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/Mail/Mail_vs71.vcproj b/Net/samples/Mail/Mail_vs71.vcproj index ac6a8b005..befb853f9 100644 --- a/Net/samples/Mail/Mail_vs71.vcproj +++ b/Net/samples/Mail/Mail_vs71.vcproj @@ -128,6 +128,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/Ping/Ping_vs71.vcproj b/Net/samples/Ping/Ping_vs71.vcproj index 741d69bb9..77cd9637b 100644 --- a/Net/samples/Ping/Ping_vs71.vcproj +++ b/Net/samples/Ping/Ping_vs71.vcproj @@ -128,6 +128,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/TimeServer/TimeServer_vs71.vcproj b/Net/samples/TimeServer/TimeServer_vs71.vcproj index 9c5d25c1b..ecee5fd03 100644 --- a/Net/samples/TimeServer/TimeServer_vs71.vcproj +++ b/Net/samples/TimeServer/TimeServer_vs71.vcproj @@ -128,6 +128,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/dict/dict_vs71.vcproj b/Net/samples/dict/dict_vs71.vcproj index 3b6c7b362..946b10216 100644 --- a/Net/samples/dict/dict_vs71.vcproj +++ b/Net/samples/dict/dict_vs71.vcproj @@ -128,6 +128,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/dict/src/dict.cpp b/Net/samples/dict/src/dict.cpp index 6488a3198..2de9901ae 100644 --- a/Net/samples/dict/src/dict.cpp +++ b/Net/samples/dict/src/dict.cpp @@ -1,7 +1,7 @@ // // dict.cpp // -// $Id: //poco/1.3/Net/samples/dict/src/dict.cpp#1 $ +// $Id: //poco/1.3/Net/samples/dict/src/dict.cpp#2 $ // // This sample demonstrates the StreamSocket and SocketStream classes. // diff --git a/Net/samples/download/download_vs71.vcproj b/Net/samples/download/download_vs71.vcproj index 2b4bee74f..0e6c6e7cd 100644 --- a/Net/samples/download/download_vs71.vcproj +++ b/Net/samples/download/download_vs71.vcproj @@ -128,6 +128,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/httpget/httpget_vs71.vcproj b/Net/samples/httpget/httpget_vs71.vcproj index a3d39b6a9..4f02c5c12 100644 --- a/Net/samples/httpget/httpget_vs71.vcproj +++ b/Net/samples/httpget/httpget_vs71.vcproj @@ -128,6 +128,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/samples_vs71.sln b/Net/samples/samples_vs71.sln index 642a87dbb..e436375b4 100644 --- a/Net/samples/samples_vs71.sln +++ b/Net/samples/samples_vs71.sln @@ -42,49 +42,93 @@ EndProject Global GlobalSection(SolutionConfiguration) = preSolution debug_shared = debug_shared + debug_static = debug_static release_shared = release_shared + release_static = release_static + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {1DDAE25B-2263-45B2-8931-C36AD28A0362}.debug_shared.ActiveCfg = debug_shared|Win32 {1DDAE25B-2263-45B2-8931-C36AD28A0362}.debug_shared.Build.0 = debug_shared|Win32 + {1DDAE25B-2263-45B2-8931-C36AD28A0362}.debug_static.ActiveCfg = debug_static|Win32 + {1DDAE25B-2263-45B2-8931-C36AD28A0362}.debug_static.Build.0 = debug_static|Win32 {1DDAE25B-2263-45B2-8931-C36AD28A0362}.release_shared.ActiveCfg = release_shared|Win32 {1DDAE25B-2263-45B2-8931-C36AD28A0362}.release_shared.Build.0 = release_shared|Win32 + {1DDAE25B-2263-45B2-8931-C36AD28A0362}.release_static.ActiveCfg = release_static|Win32 + {1DDAE25B-2263-45B2-8931-C36AD28A0362}.release_static.Build.0 = release_static|Win32 {7C4285ED-F0BC-4CBA-B1F0-61FCB7FA26C4}.debug_shared.ActiveCfg = debug_shared|Win32 {7C4285ED-F0BC-4CBA-B1F0-61FCB7FA26C4}.debug_shared.Build.0 = debug_shared|Win32 + {7C4285ED-F0BC-4CBA-B1F0-61FCB7FA26C4}.debug_static.ActiveCfg = debug_static|Win32 + {7C4285ED-F0BC-4CBA-B1F0-61FCB7FA26C4}.debug_static.Build.0 = debug_static|Win32 {7C4285ED-F0BC-4CBA-B1F0-61FCB7FA26C4}.release_shared.ActiveCfg = release_shared|Win32 {7C4285ED-F0BC-4CBA-B1F0-61FCB7FA26C4}.release_shared.Build.0 = release_shared|Win32 + {7C4285ED-F0BC-4CBA-B1F0-61FCB7FA26C4}.release_static.ActiveCfg = release_static|Win32 + {7C4285ED-F0BC-4CBA-B1F0-61FCB7FA26C4}.release_static.Build.0 = release_static|Win32 {D1CACC03-A306-4ACA-82D3-005542CB119B}.debug_shared.ActiveCfg = debug_shared|Win32 {D1CACC03-A306-4ACA-82D3-005542CB119B}.debug_shared.Build.0 = debug_shared|Win32 + {D1CACC03-A306-4ACA-82D3-005542CB119B}.debug_static.ActiveCfg = debug_static|Win32 + {D1CACC03-A306-4ACA-82D3-005542CB119B}.debug_static.Build.0 = debug_static|Win32 {D1CACC03-A306-4ACA-82D3-005542CB119B}.release_shared.ActiveCfg = release_shared|Win32 {D1CACC03-A306-4ACA-82D3-005542CB119B}.release_shared.Build.0 = release_shared|Win32 + {D1CACC03-A306-4ACA-82D3-005542CB119B}.release_static.ActiveCfg = release_static|Win32 + {D1CACC03-A306-4ACA-82D3-005542CB119B}.release_static.Build.0 = release_static|Win32 {F232C4F0-4D36-454A-816F-C171E47AF61D}.debug_shared.ActiveCfg = debug_shared|Win32 {F232C4F0-4D36-454A-816F-C171E47AF61D}.debug_shared.Build.0 = debug_shared|Win32 + {F232C4F0-4D36-454A-816F-C171E47AF61D}.debug_static.ActiveCfg = debug_static|Win32 + {F232C4F0-4D36-454A-816F-C171E47AF61D}.debug_static.Build.0 = debug_static|Win32 {F232C4F0-4D36-454A-816F-C171E47AF61D}.release_shared.ActiveCfg = release_shared|Win32 {F232C4F0-4D36-454A-816F-C171E47AF61D}.release_shared.Build.0 = release_shared|Win32 + {F232C4F0-4D36-454A-816F-C171E47AF61D}.release_static.ActiveCfg = release_static|Win32 + {F232C4F0-4D36-454A-816F-C171E47AF61D}.release_static.Build.0 = release_static|Win32 {22F6B2E6-A532-4156-A49A-835A21BFF3F6}.debug_shared.ActiveCfg = debug_shared|Win32 {22F6B2E6-A532-4156-A49A-835A21BFF3F6}.debug_shared.Build.0 = debug_shared|Win32 + {22F6B2E6-A532-4156-A49A-835A21BFF3F6}.debug_static.ActiveCfg = debug_static|Win32 + {22F6B2E6-A532-4156-A49A-835A21BFF3F6}.debug_static.Build.0 = debug_static|Win32 {22F6B2E6-A532-4156-A49A-835A21BFF3F6}.release_shared.ActiveCfg = release_shared|Win32 {22F6B2E6-A532-4156-A49A-835A21BFF3F6}.release_shared.Build.0 = release_shared|Win32 + {22F6B2E6-A532-4156-A49A-835A21BFF3F6}.release_static.ActiveCfg = release_static|Win32 + {22F6B2E6-A532-4156-A49A-835A21BFF3F6}.release_static.Build.0 = release_static|Win32 {7339ED24-9950-4B74-8519-E8DC66C0524E}.debug_shared.ActiveCfg = debug_shared|Win32 {7339ED24-9950-4B74-8519-E8DC66C0524E}.debug_shared.Build.0 = debug_shared|Win32 + {7339ED24-9950-4B74-8519-E8DC66C0524E}.debug_static.ActiveCfg = debug_static|Win32 + {7339ED24-9950-4B74-8519-E8DC66C0524E}.debug_static.Build.0 = debug_static|Win32 {7339ED24-9950-4B74-8519-E8DC66C0524E}.release_shared.ActiveCfg = release_shared|Win32 {7339ED24-9950-4B74-8519-E8DC66C0524E}.release_shared.Build.0 = release_shared|Win32 + {7339ED24-9950-4B74-8519-E8DC66C0524E}.release_static.ActiveCfg = release_static|Win32 + {7339ED24-9950-4B74-8519-E8DC66C0524E}.release_static.Build.0 = release_static|Win32 {1B776CF5-3889-48D1-A58B-694D06FBD632}.debug_shared.ActiveCfg = debug_shared|Win32 {1B776CF5-3889-48D1-A58B-694D06FBD632}.debug_shared.Build.0 = debug_shared|Win32 + {1B776CF5-3889-48D1-A58B-694D06FBD632}.debug_static.ActiveCfg = debug_static|Win32 + {1B776CF5-3889-48D1-A58B-694D06FBD632}.debug_static.Build.0 = debug_static|Win32 {1B776CF5-3889-48D1-A58B-694D06FBD632}.release_shared.ActiveCfg = release_shared|Win32 {1B776CF5-3889-48D1-A58B-694D06FBD632}.release_shared.Build.0 = release_shared|Win32 + {1B776CF5-3889-48D1-A58B-694D06FBD632}.release_static.ActiveCfg = release_static|Win32 + {1B776CF5-3889-48D1-A58B-694D06FBD632}.release_static.Build.0 = release_static|Win32 {455C9515-4914-49B6-93FB-C37242A6C21C}.debug_shared.ActiveCfg = debug_shared|Win32 {455C9515-4914-49B6-93FB-C37242A6C21C}.debug_shared.Build.0 = debug_shared|Win32 + {455C9515-4914-49B6-93FB-C37242A6C21C}.debug_static.ActiveCfg = debug_static|Win32 + {455C9515-4914-49B6-93FB-C37242A6C21C}.debug_static.Build.0 = debug_static|Win32 {455C9515-4914-49B6-93FB-C37242A6C21C}.release_shared.ActiveCfg = release_shared|Win32 {455C9515-4914-49B6-93FB-C37242A6C21C}.release_shared.Build.0 = release_shared|Win32 + {455C9515-4914-49B6-93FB-C37242A6C21C}.release_static.ActiveCfg = release_static|Win32 + {455C9515-4914-49B6-93FB-C37242A6C21C}.release_static.Build.0 = release_static|Win32 {73408DCF-2E65-47AF-BF38-7466DAB8D5CB}.debug_shared.ActiveCfg = debug_shared|Win32 {73408DCF-2E65-47AF-BF38-7466DAB8D5CB}.debug_shared.Build.0 = debug_shared|Win32 + {73408DCF-2E65-47AF-BF38-7466DAB8D5CB}.debug_static.ActiveCfg = debug_static|Win32 + {73408DCF-2E65-47AF-BF38-7466DAB8D5CB}.debug_static.Build.0 = debug_static|Win32 {73408DCF-2E65-47AF-BF38-7466DAB8D5CB}.release_shared.ActiveCfg = release_shared|Win32 {73408DCF-2E65-47AF-BF38-7466DAB8D5CB}.release_shared.Build.0 = release_shared|Win32 + {73408DCF-2E65-47AF-BF38-7466DAB8D5CB}.release_static.ActiveCfg = release_static|Win32 + {73408DCF-2E65-47AF-BF38-7466DAB8D5CB}.release_static.Build.0 = release_static|Win32 {45A054E6-44EC-4943-809A-BA8B2A25DA21}.debug_shared.ActiveCfg = debug_shared|Win32 {45A054E6-44EC-4943-809A-BA8B2A25DA21}.debug_shared.Build.0 = debug_shared|Win32 + {45A054E6-44EC-4943-809A-BA8B2A25DA21}.debug_static.ActiveCfg = debug_static|Win32 + {45A054E6-44EC-4943-809A-BA8B2A25DA21}.debug_static.Build.0 = debug_static|Win32 {45A054E6-44EC-4943-809A-BA8B2A25DA21}.release_shared.ActiveCfg = release_shared|Win32 {45A054E6-44EC-4943-809A-BA8B2A25DA21}.release_shared.Build.0 = release_shared|Win32 + {45A054E6-44EC-4943-809A-BA8B2A25DA21}.release_static.ActiveCfg = release_static|Win32 + {45A054E6-44EC-4943-809A-BA8B2A25DA21}.release_static.Build.0 = release_static|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/Net/src/MulticastSocket.cpp b/Net/src/MulticastSocket.cpp index c591dbe66..69f32810f 100644 --- a/Net/src/MulticastSocket.cpp +++ b/Net/src/MulticastSocket.cpp @@ -1,7 +1,7 @@ // // MulticastSocket.cpp // -// $Id: //poco/1.3/Net/src/MulticastSocket.cpp#1 $ +// $Id: //poco/1.3/Net/src/MulticastSocket.cpp#2 $ // // Library: Net // Package: Sockets @@ -185,7 +185,7 @@ void MulticastSocket::setTimeToLive(unsigned value) unsigned MulticastSocket::getTimeToLive() const { - unsigned ttl; + unsigned ttl(0); if (address().af() == AF_INET) { unsigned char cttl; diff --git a/Net/src/SMTPClientSession.cpp b/Net/src/SMTPClientSession.cpp index 56b686337..016a23bd6 100644 --- a/Net/src/SMTPClientSession.cpp +++ b/Net/src/SMTPClientSession.cpp @@ -1,7 +1,7 @@ // // SMTPClientSession.cpp // -// $Id: //poco/1.3/Net/src/SMTPClientSession.cpp#1 $ +// $Id: //poco/1.3/Net/src/SMTPClientSession.cpp#2 $ // // Library: Net // Package: Mail @@ -53,14 +53,14 @@ namespace Net { SMTPClientSession::SMTPClientSession(const StreamSocket& socket): _socket(socket), - _isOpen(true) + _isOpen(false) { } SMTPClientSession::SMTPClientSession(const std::string& host, Poco::UInt16 port): _socket(SocketAddress(host, port)), - _isOpen(true) + _isOpen(false) { } @@ -91,10 +91,9 @@ Poco::Timespan SMTPClientSession::getTimeout() const void SMTPClientSession::login(const std::string& hostname) { + open(); std::string response; - int status = _socket.receiveStatusMessage(response); - if (!isPositiveCompletion(status)) throw SMTPException("The mail service is unavailable", response); - status = sendCommand("EHLO", hostname, response); + int status = sendCommand("EHLO", hostname, response); if (isPermanentNegative(status)) status = sendCommand("HELO", hostname, response); if (!isPositiveCompletion(status)) throw SMTPException("Login failed", response); @@ -107,6 +106,18 @@ void SMTPClientSession::login() } +void SMTPClientSession::open() +{ + if (!_isOpen) + { + std::string response; + int status = _socket.receiveStatusMessage(response); + if (!isPositiveCompletion(status)) throw SMTPException("The mail service is unavailable", response); + _isOpen = true; + } +} + + void SMTPClientSession::close() { if (_isOpen) diff --git a/Net/testsuite/TestSuite_vs71.vcproj b/Net/testsuite/TestSuite_vs71.vcproj index 3d9d6e78a..84734a1c7 100644 --- a/Net/testsuite/TestSuite_vs71.vcproj +++ b/Net/testsuite/TestSuite_vs71.vcproj @@ -128,6 +128,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/testsuite/TestSuite_vs80.vcproj b/Net/testsuite/TestSuite_vs80.vcproj index f43b8c032..7e099ba64 100644 --- a/Net/testsuite/TestSuite_vs80.vcproj +++ b/Net/testsuite/TestSuite_vs80.vcproj @@ -1,7 +1,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +