Fixed Warning in OCException
authorErich Keane <erich.keane@intel.com>
Thu, 11 Dec 2014 22:02:57 +0000 (14:02 -0800)
committerErich Keane <erich.keane@intel.com>
Tue, 16 Dec 2014 22:02:19 +0000 (14:02 -0800)
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 <erich.keane@intel.com>
resource/include/StringConstants.h
resource/src/OCException.cpp
resource/src/OCUtilities.cpp

index b29fb0c..048a476 100644 (file)
@@ -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";
index 97381e5..9bea2e2 100644 (file)
@@ -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;
index c55d8f9..530f673 100644 (file)
@@ -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;