Support for partial chroma resource updation in hue plugin
authorvijendrx <vijendrax.kumar@intel.com>
Tue, 7 Mar 2017 12:14:40 +0000 (17:44 +0530)
committerTodd Malsbary <todd.malsbary@intel.com>
Wed, 8 Mar 2017 16:42:44 +0000 (16:42 +0000)
Added support for updating hue and saturation attributes of
chroma resource in hue plugin on an individual basis.

Change-Id: Ia07e9a858cc3190d0cd4df77f566ef6abc5bd539
Signed-off-by: vijendrx <vijendrax.kumar@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17751
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Tested-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
bridging/plugins/hue_plugin/hue_resource.cpp

index d86febb..6dd8cfd 100644 (file)
@@ -922,7 +922,6 @@ OCEntityHandlerResult processPutRequest(OCEntityHandlerRequest *ehRequest,
 
         if (!OCRepPayloadGetPropInt(input, "hue", &light_resource.hue))
         {
-            isChromaPropertyInPayload = true;
             OIC_LOG(INFO, TAG, "No hue in PUT payload");
         }
         else
@@ -934,7 +933,7 @@ OCEntityHandlerResult processPutRequest(OCEntityHandlerRequest *ehRequest,
 
         if (!OCRepPayloadGetPropInt(input, "saturation", &light_resource.sat))
         {
-            throw "No saturation in PUT payload";
+            OIC_LOG(INFO, TAG, "No saturation in PUT payload");
         }
         else
         {