Commit bbe7232e authored by Chul Lee's avatar Chul Lee Committed by Randeep

[IOT-1473] Modify the return value of MOT related API.

Change-Id: I9e2a6d79358538896c64e5870d96c0ca796a0b6e
Signed-off-by: default avatarChul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13687Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatardongik Lee <dongik.lee@samsung.com>
Reviewed-by: Randeep's avatarRandeep Singh <randeep.s@samsung.com>
parent a359fffa
......@@ -327,15 +327,16 @@ exit:
OCStackResult MOTSelectMOTMethod(void *ctx, const OCProvisionDev_t *targetDeviceInfo,
const OicSecOxm_t oxmSelValue, OCProvisionResultCB resultCallback)
{
OCStackResult postMomRes = OC_STACK_INVALID_PARAM;
OCStackResult postMomRes = OC_STACK_INVALID_CALLBACK;
OicSecDoxm_t* doxm = NULL;
uint8_t* doxmPayload = NULL;
size_t doxmPayloadLen = 0;
OIC_LOG(DEBUG, TAG, "IN MOTSelectOTMethod");
VERIFY_NON_NULL(TAG, targetDeviceInfo, ERROR);
VERIFY_NON_NULL(TAG, resultCallback, ERROR);
postMomRes = OC_STACK_INVALID_PARAM;
VERIFY_NON_NULL(TAG, targetDeviceInfo, ERROR);
bool isValidOxmsel = false;
for(size_t i = 0; i < targetDeviceInfo->doxm->oxmLen; i++)
......@@ -383,7 +384,7 @@ exit:
OCStackResult MOTProvisionPreconfigPIN(void *ctx, const OCProvisionDev_t *targetDeviceInfo,
const char* preconfPIN, size_t preconfPINLen, OCProvisionResultCB resultCallback)
{
OCStackResult postCredRes = OC_STACK_INVALID_PARAM;
OCStackResult postCredRes = OC_STACK_INVALID_CALLBACK;
bool freeFlag = true;
OCSecurityPayload* secPayload = NULL;
MOTContext_t *motCtx = NULL;
......@@ -391,8 +392,9 @@ OCStackResult MOTProvisionPreconfigPIN(void *ctx, const OCProvisionDev_t *target
OIC_LOG(DEBUG, TAG, "IN MOTProvisionPreconfigPIN");
VERIFY_NON_NULL(TAG, targetDeviceInfo, ERROR);
VERIFY_NON_NULL(TAG, resultCallback, ERROR);
postCredRes = OC_STACK_INVALID_PARAM;
VERIFY_NON_NULL(TAG, targetDeviceInfo, ERROR);
VERIFY_NON_NULL(TAG, preconfPIN, ERROR);
VERIFY_SUCCESS(TAG, (0 != preconfPINLen), ERROR);
VERIFY_SUCCESS(TAG, (0 != preconfPINLen && OXM_PRECONFIG_PIN_SIZE >= preconfPINLen), ERROR);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment