From 396e5bbb37f8c78b9ef4cf598dc66ec0c4996d3c Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 9 Dec 2013 08:00:21 +0000 Subject: [PATCH] fixed missing case in save_struct --- src/session_impl.cpp | 2 +- src/settings.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 09d11c0fa..321bcdab0 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -2903,7 +2903,7 @@ retry: // someone else is holding a reference, it's important that // it's destructed from the network thread. Make sure the // last reference is held by the network thread. - if (!p->refcount() == 1) + if (p->refcount() != 1) m_undead_peers.push_back((peer_connection*)p); // too expensive diff --git a/src/settings.cpp b/src/settings.cpp index 524be0359..83fa94818 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -129,6 +129,7 @@ namespace libtorrent case std_string: val = *((std::string*)src); break; case character: val = *((char*)src); break; case integer: val = *((int*)src); break; + case integer16: val = *((boost::uint16_t*)src); break; case size_integer: val = *((size_type*)src); break; case time_integer: val = *((time_t*)src); break; case floating_point: val = size_type(*((float*)src) * 1000.f); break;