Skip to content

Commit ac6ddaf

Browse files
committed
Merge branch 'development' of https://git01.codeplex.com/casablanca into handwritten_unicode
2 parents 41afbe4 + c2f247a commit ac6ddaf

File tree

7 files changed

+33
-16
lines changed

7 files changed

+33
-16
lines changed

Build/version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<CppRestBaseFileName>cpprest</CppRestBaseFileName>
55
<CppRestSDKVersionMajor>2</CppRestSDKVersionMajor>
6-
<CppRestSDKVersionMinor>5</CppRestSDKVersionMinor>
6+
<CppRestSDKVersionMinor>6</CppRestSDKVersionMinor>
77
<CppRestSDKVersionRevision>0</CppRestSDKVersionRevision>
88
<CppRestSDKVersionFileSuffix>$(CppRestSDKVersionMajor)_$(CppRestSDKVersionMinor)</CppRestSDKVersionFileSuffix>
99
<CppRestSDKVersionString>$(CppRestSDKVersionMajor).$(CppRestSDKVersionMinor)</CppRestSDKVersionString>

CONTRIBUTORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ intercommiura
1717
halex2005
1818
simonlep
1919
jracle
20+
gandziej
2021

2122
AutoDesk Inc.
2223
Cyrille Fauvel (cyrillef)

Release/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set(ANDROID_STL_FLAGS)
99

1010
# Platform (not compiler) specific settings
1111
if(IOS)
12-
set(IOS_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../Build_iOS")
12+
set(IOS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Build_iOS")
1313
set(Boost_FRAMEWORK "-F ${IOS_SOURCE_DIR} -framework boost")
1414
set(Boost_INCLUDE_DIR "${IOS_SOURCE_DIR}/boost.framework/Headers")
1515

Release/include/cpprest/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* ==--==
1717
*/
1818
#define CPPREST_VERSION_REVISION 0
19-
#define CPPREST_VERSION_MINOR 5
19+
#define CPPREST_VERSION_MINOR 6
2020
#define CPPREST_VERSION_MAJOR 2
2121

2222
#define CPPREST_VERSION (CPPREST_VERSION_MAJOR*100000+CPPREST_VERSION_MINOR*100+CPPREST_VERSION_REVISION)

Release/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ target_link_libraries(${Casablanca_LIBRARY}
9292

9393
# Portions specific to cpprest binary versioning.
9494
set (CPPREST_VERSION_MAJOR 2)
95-
set (CPPREST_VERSION_MINOR 5)
95+
set (CPPREST_VERSION_MINOR 6)
9696
set (CPPREST_VERSION_REVISION 0)
9797

9898
if(WIN32)

Release/src/build/package_info.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<package>
22
<metadata>
33
<base_id>cpprestsdk</base_id>
4-
<version>2.5.0</version>
4+
<version>2.6.0</version>
55
<authors>casablancacore</authors>
66
<owners>Microsoft, Visual C++</owners>
77
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
@@ -10,7 +10,7 @@
1010
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1111
<summary>The C++ REST SDK is a cross-platform, modern, and asynchronous library that enables developers to access and author connected applications.</summary>
1212
<description>The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.</description>
13-
<releaseNotes>https://casablanca.codeplex.com/releases/view/574398</releaseNotes>
13+
<releaseNotes>https://casablanca.codeplex.com/releases/view/612765</releaseNotes>
1414
<copyright>Copyright 2015</copyright>
1515
<tags>cpprestsdk Casablanca REST JSON HTTP URI WebSockets</tags>
1616
</metadata>

Release/src/http/listener/http_server_asio.cpp

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -853,21 +853,37 @@ pplx::task<void> http_linux_server::register_listener(details::http_listener_imp
853853
{
854854
pplx::extensibility::scoped_rw_lock_t lock(m_listeners_lock);
855855
if (m_registered_listeners.find(listener) != m_registered_listeners.end())
856+
{
856857
throw std::invalid_argument("listener already registered");
858+
}
857859

858-
m_registered_listeners[listener] = utility::details::make_unique<pplx::extensibility::reader_writer_lock_t>();
859-
860-
auto found_hostport_listener = m_listeners.find(hostport);
861-
if (found_hostport_listener == m_listeners.end())
860+
try
862861
{
863-
found_hostport_listener = m_listeners.insert(
864-
std::make_pair(hostport, utility::details::make_unique<details::hostport_listener>(this, hostport))).first;
862+
m_registered_listeners[listener] = utility::details::make_unique<pplx::extensibility::reader_writer_lock_t>();
865863

866-
if (m_started)
867-
found_hostport_listener->second->start();
868-
}
864+
auto found_hostport_listener = m_listeners.find(hostport);
865+
if (found_hostport_listener == m_listeners.end())
866+
{
867+
found_hostport_listener = m_listeners.insert(
868+
std::make_pair(hostport, utility::details::make_unique<details::hostport_listener>(this, hostport))).first;
869869

870-
found_hostport_listener->second->add_listener(path, listener);
870+
if (m_started)
871+
{
872+
found_hostport_listener->second->start();
873+
}
874+
}
875+
876+
found_hostport_listener->second->add_listener(path, listener);
877+
}
878+
catch (...)
879+
{
880+
// Future improvement - really this API should entirely be asychronously.
881+
// the hostport_listener::start() method should be made to return a task
882+
// throwing the exception.
883+
m_registered_listeners.erase(listener);
884+
m_listeners.erase(hostport);
885+
throw;
886+
}
871887
}
872888

873889
return pplx::task_from_result();

0 commit comments

Comments
 (0)