#include "OCPlatform.h"
#include "OCException.h"
#include "ocpayload.h"
+#include "oic_malloc.h"
using namespace OC;
char *uri = NULL;
OCRepPayloadGetPropString(links[i], OC_RSRVD_HREF, &uri);
OCResourceHandle handle = OCGetResourceHandleAtUri(uri);
+
int64_t ins = 0;
OCRepPayloadGetPropInt(links[i], OC_RSRVD_INS, &ins);
OCBindResourceInsToResource(handle, ins);
+
+ OICFree(uri);
+ }
+
+ // Free links
+ size_t count = calcDimTotal(dimensions);
+ for (size_t k = 0; k < count; k++)
+ {
+ OCRepPayloadDestroy(links[k]);
}
+ OICFree(links);
}
OCRepresentation rep = parseRDResponseCallback(clientResponse);
std::thread exec(context->callback, rep, clientResponse->result);