Revert back cbor related patches.
[platform/upstream/iotivity.git] / resource / csdk / security / provisioning / src / pmutility.c
index 31208db..2e4158b 100644 (file)
@@ -489,17 +489,16 @@ static OCStackApplicationResult DeviceDiscoveryHandler(void *ctx, OCDoHandle UNU
                 OIC_LOG(INFO, TAG, "Unknown payload type");
                 return OC_STACK_KEEP_TRANSACTION;
             }
-            OicSecDoxm_t *ptrDoxm = NULL;
-            uint8_t *payload = ((OCSecurityPayload*)clientResponse->payload)->securityData1;
-            OCStackResult res = CBORPayloadToDoxm(payload, 0, &ptrDoxm);
-            if ((NULL == ptrDoxm) && (OC_STACK_OK != res))
+            OicSecDoxm_t *ptrDoxm = JSONToDoxmBin(
+                            ((OCSecurityPayload*)clientResponse->payload)->securityData);
+            if (NULL == ptrDoxm)
             {
-                OIC_LOG(INFO, TAG, "Ignoring malformed CBOR");
+                OIC_LOG(INFO, TAG, "Ignoring malformed JSON");
                 return OC_STACK_KEEP_TRANSACTION;
             }
             else
             {
-                OIC_LOG(DEBUG, TAG, "Successfully converted doxm cbor to bin.");
+                OIC_LOG(DEBUG, TAG, "Successfully converted doxm json to bin.");
 
                 //If this is owend device discovery we have to filter out the responses.
                 DiscoveryInfo* pDInfo = (DiscoveryInfo*)ctx;