Change-Id: Id6a1b8edb41b3863ba722db43285d28e264dfda8
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13133
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit
07dbd388c00fb4aa122f13d59b5373854a64176f)
Reviewed-on: https://gerrit.iotivity.org/gerrit/13823
}
#else
// #1. calculate timeout
- uint64_t timeOut = (2 << retData->triedCount) * 1000000;
+ uint64_t timeOut = (2 << retData->triedCount) * (uint64_t) 1000000;
if (currentTime >= retData->timeStamp + timeOut)
{
OIC_LOG_V(DEBUG, TAG, "Publish Resource to RD with device id [%s]", id);
OCResourceHandle *pubResHandle = resourceHandles;
+ OCResourceHandle defaultResHandles[OIC_RD_DEFAULT_RESOURCE] = { 0 };
uint8_t nPubResHandles = nHandles;
// if resource handles is null, "/oic/p" and "/oic/d" resource will be published to RD.
- if (!pubResHandle && !nPubResHandles)
+ if (!pubResHandle)
{
- OCResourceHandle defaultResHandles[OIC_RD_DEFAULT_RESOURCE] = { 0 };
-
// get "/oic/d" and "/oic/p" resource handle from stack.
defaultResHandles[0] = OCGetResourceHandleAtUri(OC_RSRVD_DEVICE_URI);
defaultResHandles[1] = OCGetResourceHandleAtUri(OC_RSRVD_PLATFORM_URI);
OCStackResult OCGetDeviceId(OCUUIdentity *deviceId)
{
OicUuid_t oicUuid;
- OCStackResult ret;
+ OCStackResult ret = OC_STACK_ERROR;
ret = GetDoxmDeviceID(&oicUuid);
if (OC_STACK_OK == ret)
OCStackResult OCSetDeviceId(const OCUUIdentity *deviceId)
{
OicUuid_t oicUuid;
- OCStackResult ret;
- OIC_LOG(ERROR, TAG, "Set deviceId DOXM");
+ OCStackResult ret = OC_STACK_ERROR;
memcpy(&oicUuid, deviceId, UUID_LENGTH);
- for(int i=0;i < UUID_LENGTH; i++)
+ for (int i = 0; i < UUID_LENGTH; i++)
{
OIC_LOG_V(INFO, TAG, "Set Device Id %x", oicUuid.id[i]);
}