Name: iotcon
Summary: Tizen IoT Connectivity
-Version: 0.3.13
+Version: 0.3.14
Release: 0
Group: Network & Connectivity/Service
License: Apache-2.0
break;
}
+ INFO("Call the callback done");
resource->is_found = false;
}
}
RETV_IF(NULL == ctx, OC_STACK_KEEP_TRANSACTION);
RETV_IF(NULL == resp, OC_STACK_KEEP_TRANSACTION);
+ if (OC_STACK_NO_RESOURCE == resp->result) {
+ DBG("No Resource on [%s:%d]", resp->devAddr.addr, resp->devAddr.port);
+ return OC_STACK_KEEP_TRANSACTION;
+ }
RETV_IF(NULL == resp->payload, OC_STACK_KEEP_TRANSACTION); /* normal case : payload COULD be NULL */
RETVM_IF(PAYLOAD_TYPE_DISCOVERY != resp->payload->type,
OC_STACK_KEEP_TRANSACTION, "Invalid payload type(%d)", resp->payload->type);
resource = req_container->resource;
request = req_container->request;
+ DBG("resource:[%p], resource->cb:[%p] on [%s]", resource, resource->cb, resource->uri_path);
resource->cb(resource, request, resource->user_data);
+ DBG("callback done");
+
icl_destroy_request_container(req_container);
return G_SOURCE_REMOVE;
req_container->request = req;
req_container->resource = resource;
+ DBG("req_type [%d], obs_type [%d]", req_type, obs_type);
+
g_idle_add(_icl_ioty_ocprocess_request_idle_cb, req_container);
return OC_EH_SLOW;
cb_info->timeout = 0;
if (cb_info->cb) {
+ DBG("Call the callback : op [%d], handle [%p], cb [%p]", cb_info->op, cb_info->handle, cb_info->cb);
switch (cb_info->op) {
case ICL_FIND_RESOURCE:
((iotcon_found_resource_cb)cb_info->cb)(NULL, IOTCON_ERROR_TIMEOUT,
return G_SOURCE_REMOVE;
}
}
-
+ DBG("Call the callback done");
ret = icl_ioty_mutex_lock();
if (IOTCON_ERROR_NONE != ret) {
ERR("icl_ioty_mutex_lock() Fail(%d)", ret);
return G_SOURCE_REMOVE;
}
+ FN_END;
return G_SOURCE_REMOVE;
}
/* LCOV_EXCL_STOP */
iotcon_response_h response,
void *user_data)
{
+ FN_CALL;
int ret;
iotcon_representation_h repr;
iotcon_remote_resource_state_e state;
}
if (state != resource->monitoring.state) {
+ DBG("call the callback...");
resource->monitoring.cb(resource, state, resource->monitoring.user_data);
resource->monitoring.state = state;
+ DBG("call the callback done");
}
}
if (response)
response->repr = NULL;
- if (resource->caching.cb)
+ if (resource->caching.cb) {
+ DBG("call the callback...");
resource->caching.cb(resource, repr, resource->caching.user_data);
+ DBG("call the callback done");
+ }
}
}
}
if (resource->monitoring.presence)
return IOTCON_ERROR_NONE;
+ DBG("checking_interval:[%d]", resource->checking_interval);
+
ret = icl_ioty_remote_resource_set_checking_interval(resource,
resource->checking_interval);
if (IOTCON_ERROR_NONE != ret) {
}
*resource_handle = resource;
+ DBG("resource:[%p]", resource);
return IOTCON_ERROR_NONE;
}
#define ICL_TIMEOUT_DEFAULT 30 /* 30 sec */
#define ICL_DEFAULT_DEVICE_NAME "UNKNOWN"
+#define ICL_POLLING_INTERVAL_MAX 999 /* 999 ms */
+
#define ICL_IOTY_TIME_INTERVAL_DEFAULT 100 /* 100 ms */
static pthread_t icl_thread;
int icl_polling_set_interval(int interval)
{
RETV_IF(interval <= 0, IOTCON_ERROR_INVALID_PARAMETER);
+ RETV_IF(interval > ICL_POLLING_INTERVAL_MAX, IOTCON_ERROR_INVALID_PARAMETER);
+
INFO("interval [%d]", interval);
icl_ioty_polling_interval = interval;