From 33218670296356fe54da3e6909a651dc2745dc45 Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Thu, 11 Dec 2014 14:02:57 -0800 Subject: [PATCH] Fixed Warning in OCException Added case statements for two new conditions in OCException that were forgotten when we implemented this in the past. Change-Id: I99ab3c2c8ad4f46d9ee35c639970ea93e69f9813 Signed-off-by: Erich Keane --- resource/include/StringConstants.h | 1 + resource/src/OCException.cpp | 4 ++++ resource/src/OCUtilities.cpp | 2 ++ 3 files changed, 7 insertions(+) diff --git a/resource/include/StringConstants.h b/resource/include/StringConstants.h index b29fb0c..048a476 100644 --- a/resource/include/StringConstants.h +++ b/resource/include/StringConstants.h @@ -87,6 +87,7 @@ namespace OC static const std::string OBSV_NOT_REMOVED = "Stack observer not removed"; static const std::string STACK_RESOURCE_DELETED = "The specified resource has been deleted"; static const std::string PRESENCE_STOPPED = "Stack presence stopped"; + static const std::string PRESENCE_TIMEOUT = "Stack presence timed out"; static const std::string PRESENCE_NOT_HANDLED = "Stack presence should not be handled"; static const std::string INVALID_OPTION = "Invalid option"; static const std::string GENERAL_FAULT = "General Fault"; diff --git a/resource/src/OCException.cpp b/resource/src/OCException.cpp index 97381e5..9bea2e2 100644 --- a/resource/src/OCException.cpp +++ b/resource/src/OCException.cpp @@ -66,6 +66,10 @@ std::string OC::OCException::reason(const OCStackResult sr) #ifdef WITH_PRESENCE case OC_STACK_PRESENCE_STOPPED: return OC::Exception::PRESENCE_STOPPED; + case OC_STACK_PRESENCE_TIMEOUT: + return OC::Exception::PRESENCE_TIMEOUT; + case OC_STACK_PRESENCE_DO_NOT_HANDLE: + return OC::Exception::PRESENCE_NOT_HANDLED; #endif case OC_STACK_VIRTUAL_DO_NOT_HANDLE: return OC::Exception::VIRTUAL_DO_NOT_HANDLE; diff --git a/resource/src/OCUtilities.cpp b/resource/src/OCUtilities.cpp index c55d8f9..530f673 100644 --- a/resource/src/OCUtilities.cpp +++ b/resource/src/OCUtilities.cpp @@ -203,6 +203,8 @@ OCStackResult result_guard(const OCStackResult r) case OC_STACK_OBSERVER_NOT_FOUND: #ifdef WITH_PRESENCE case OC_STACK_PRESENCE_STOPPED: + case OC_STACK_PRESENCE_TIMEOUT: + case OC_STACK_PRESENCE_DO_NOT_HANDLE: #endif break; -- 2.7.4