Fix for the prevent issues for notification manager.
authorJay Sharma <jay.sharma@samsung.com>
Wed, 20 May 2015 15:25:42 +0000 (20:55 +0530)
committerUze Choi <uzchoi@samsung.com>
Wed, 20 May 2015 21:57:32 +0000 (21:57 +0000)
Change-Id: Iab02bb30bb8a4fde666974f98ff78741aa7d9720
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Signed-off-by: Arya Kumar <arya.kumar@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1052
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification-manager/SampleApp/linux/sampleConsumer/SampleConsumer.cpp
service/notification-manager/SampleApp/linux/sampleProvider/SampleProvider.cpp

index b6c25f2..bacaa67 100644 (file)
@@ -381,7 +381,11 @@ int main(int argc , char *argv[])
                 startPut(g_curResource);
                 break;
             case DELETE:
-                startDelete(g_curResource);
+                try {
+                    startDelete(g_curResource);
+                }catch(OCException e) {
+                    std::cout<< "Caught OCException [Code: "<<e.code()<<" Reason: "<<e.reason()<<std::endl;
+                }
                 break;
             default:
                 std::cout << "Invalid input, please try again" << std::endl;
index 8d924ae..abb40db 100644 (file)
@@ -56,7 +56,7 @@ class TempHumidResource
 
     public:
         TempHumidResource() :
-            m_temp(0), m_humid(0), m_uri("/a/TempHumSensor")
+            m_temp(0), m_humid(0), m_uri("/a/TempHumSensor"), m_resourceHandle(NULL)
         {
         }