RETV_IF(NULL == response_handle, IOTCON_ERROR_INVALID_PARAMETER);
- response.requestHandle = IC_INT64_TO_POINTER(response_handle->oic_request_h);
+ response.requestHandle = (unsigned int)(response_handle->oic_request_h);
response.resourceHandle = IC_INT64_TO_POINTER(response_handle->oic_resource_h);
response.ehResult = ic_ioty_convert_response_result(response_handle->result);
}
ICL_PROVISIONING_MUTEX_FIND_UNLOCK(container->cb_data);
+ DBG("uri:[%s]", uri);
ret = OCDoResource(&container->handle, OC_REST_DISCOVER, uri, 0, 0,
- container->oic_device->connType, OC_LOW_QOS, &cbdata, NULL, 0);
+ container->oic_device->connType, OC_HIGH_QOS, &cbdata, NULL, 0);
icl_ioty_mutex_unlock();
if (OC_STACK_OK != ret) {
ERR("OCDoResource() Fail(%d)", ret);
if (CT_IP_USE_V4 & conn_type) {
snprintf(temp, sizeof(temp), "%s:%d", dev_addr->addr, port);
} else if (CT_IP_USE_V6 & conn_type) {
- snprintf(temp, sizeof(temp), "[%s]:%d", dev_addr->addr, port);
+ char addressEncoded[128] = {0};
+ OCStackResult ret = OCEncodeAddressForRFC6874(addressEncoded,
+ sizeof(addressEncoded), dev_addr->addr);
+ if (OC_STACK_OK != ret) {
+ ERR("OCEncodeAddressForRFC6874 : encoding error (%d)", ret);
+ return IOTCON_ERROR_INVALID_PARAMETER;
+ }
+ snprintf(temp, sizeof(temp), "[%s]:%d", addressEncoded, port);
} else {
ERR("Invalid Connectivity Type(%d)", conn_type);
return IOTCON_ERROR_INVALID_PARAMETER;
ERR("Invalid Connectivity Type(%d)", conn_type);
return IOTCON_ERROR_INVALID_PARAMETER;
}
+ DBG("temp:[%s]", temp);
*host_address = strdup(temp);