}
/* representation */
- if (request->payload)
+ if (request->payload) {
icl_ioty_parse_oic_rep_payload((OCRepPayload*)request->payload, true, &repr);
- else
+ if (repr && NULL == repr->uri_path)
+ repr->uri_path = ic_utils_strdup(resource->uri_path);
+ } else {
repr = NULL;
+ }
+
/* for iotcon_resource_notify */
if (IOTCON_OBSERVE_REGISTER == obs_type) {
RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == representation, IOTCON_ERROR_INVALID_PARAMETER);
-
- if (NULL == resource->cached_repr) {
- ERR("No Caching Representation");
- return IOTCON_ERROR_NO_DATA;
- }
+ WARN_IF(NULL == resource->cached_repr, "No Cached Representation");
*representation = resource->cached_repr;
RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER);
- RETV_IF(NULL == resource->header_options, IOTCON_ERROR_NO_DATA);
+ WARN_IF(NULL == resource->header_options, "Not Set header options");
*options = resource->header_options;
RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER);
- RETV_IF(NULL == repr->res_types, IOTCON_ERROR_NO_DATA);
+ WARN_IF(NULL == repr->res_types, "Not Set Resource Types");
*types = repr->res_types;
RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER);
- RETV_IF(NULL == repr->interfaces, IOTCON_ERROR_NO_DATA);
+ WARN_IF(NULL == repr->interfaces, "Not Set Resource Interfaces");
*ifaces = repr->interfaces;
RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER);
+ WARN_IF(NULL == request->header_options, "Not Set header options");
*options = request->header_options;
RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER);
+ WARN_IF(NULL == request->query, "Not Set query");
*query = request->query;
RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER);
- RETV_IF(NULL == resp->header_options, IOTCON_ERROR_NO_DATA);
+ WARN_IF(NULL == resp->header_options, "Not Set header options");
*options = resp->header_options;
* @retval #IOTCON_ERROR_NONE Successful
* @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported
* @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #IOTCON_ERROR_NO_DATA No data available
*
* @see iotcon_remote_resource_get_uri_path()
* @see iotcon_remote_resource_get_host_address()
* @retval #IOTCON_ERROR_NONE Successful
* @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported
* @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #IOTCON_ERROR_NO_DATA No data
*/
int iotcon_remote_resource_get_cached_representation(
iotcon_remote_resource_h resource,
* @retval #IOTCON_ERROR_NONE Successful
* @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported
* @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #IOTCON_ERROR_NO_DATA No data available
*/
int iotcon_representation_get_resource_types(iotcon_representation_h repr,
iotcon_resource_types_h *types);
* @retval #IOTCON_ERROR_NONE Successful
* @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported
* @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #IOTCON_ERROR_NO_DATA No data available
*/
int iotcon_representation_get_resource_interfaces(iotcon_representation_h repr,
iotcon_resource_interfaces_h *ifaces);
* @retval #IOTCON_ERROR_NONE Successful
* @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported
* @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #IOTCON_ERROR_NO_DATA No data
*
* @see iotcon_response_get_representation()
* @see iotcon_response_get_result()