From 1a462617a42d3e833786cd53a59a3379f346051a Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Fri, 24 Apr 2020 09:16:14 -0700 Subject: [PATCH] minor --- configure/CONFIG_SITE | 2 ++ src/pvxs/server.h | 4 ++-- src/server.cpp | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index 7ab42d8..9bdb4af 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -43,3 +43,5 @@ CHECK_RELEASE = YES # MSVC - skip defining min()/max() macros and enable APIs USR_CPPFLAGS_WIN32 += -DNOMINMAX -D_WIN32_WINNT=_WIN32_WINNT_VISTA + +USR_CPPFLAGS += -DUSE_TYPED_RSET diff --git a/src/pvxs/server.h b/src/pvxs/server.h index e890c64..ad74337 100644 --- a/src/pvxs/server.h +++ b/src/pvxs/server.h @@ -79,9 +79,9 @@ public: //! Suitable for use in self-contained unit-tests. client::Config clientConfig() const; - //! Add a SharedPV to the builtin StaticSource + //! Add a SharedPV to the "builtin" StaticSource Server& addPV(const std::string& name, const SharedPV& pv); - //! Remove a SharedPV from the builtin StaticSource + //! Remove a SharedPV from the "builtin" StaticSource Server& removePV(const std::string& name); //! Add a Source to this server with an arbitrary source name. diff --git a/src/server.cpp b/src/server.cpp index 062d95e..cdad577 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -55,8 +55,8 @@ Server::Server(const Config& conf) // external pvt.reset(internal.get(), [internal](Pvt*) mutable { - internal->stop(); - internal.reset(); + auto trash(std::move(internal)); + trash->stop(); }); // we don't keep a weak_ptr to the external reference. // Caller is entirely responsible for keeping this server running