[CA-Integration] Fix Get working
authorSashi Penta <sashi.kumar.penta@intel.com>
Sat, 20 Dec 2014 08:51:27 +0000 (00:51 -0800)
committerSashi Penta <sashi.kumar.penta@intel.com>
Sat, 20 Dec 2014 08:51:27 +0000 (00:51 -0800)
We were not setting the numOPtions correctly for operations other than observe.

Change-Id: Iff3dd8e31d1278429ab1e42e97333eacd684190b
Signed-off-by: Sashi Penta <sashi.kumar.penta@intel.com>
resource/csdk/stack/src/ocserverrequest.c

index 15715a8..cbda482 100644 (file)
@@ -419,6 +419,10 @@ OCStackResult HandleSingleResponse(OCEntityHandlerResponse * ehResponse)
     {
         responseInfo.info.numOptions = ehResponse->numSendVendorSpecificHeaderOptions + 1;
     }
+    else
+    {
+        responseInfo.info.numOptions = ehResponse->numSendVendorSpecificHeaderOptions;
+    }
 
     responseInfo.info.options = (CAHeaderOption_t *)
                                     malloc(sizeof(CAHeaderOption_t) * responseInfo.info.numOptions);