From 8374d297ecd6c197374663276daa87ef11c39300 Mon Sep 17 00:00:00 2001 From: youngman Date: Thu, 11 Aug 2016 14:29:48 +0900 Subject: Set device info when init Change-Id: Ice3f5bfe202ae77940536e4fc83f1a38f79fa945 Signed-off-by: youngman --- src/ic.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ic.c b/src/ic.c index 89b3bd4..599e4a6 100644 --- a/src/ic.c +++ b/src/ic.c @@ -23,6 +23,8 @@ #define ICL_TIMEOUT_DEFAULT 30 /* 30 sec */ #define ICL_TIMEOUT_MAX 60*60 /* 60 min */ +#define ICL_DEFAULT_DEVICE_NAME "UNKNOWN" + static pthread_t icl_thread; static int icl_timeout_seconds = ICL_TIMEOUT_DEFAULT; static int icl_init_count; @@ -62,6 +64,14 @@ int icl_initialize(const char *file_path, bool is_pt) ic_utils_mutex_unlock(IC_UTILS_MUTEX_INIT); return ret; } + + ret = icl_ioty_set_device_info(ICL_DEFAULT_DEVICE_NAME); + if (IOTCON_ERROR_NONE != ret) { + ERR("icl_ioty_set_device_info() Fail(%d)", ret); + icl_ioty_deinit(icl_thread); + ic_utils_mutex_unlock(IC_UTILS_MUTEX_INIT); + return ret; + } } icl_init_count++; ic_utils_mutex_unlock(IC_UTILS_MUTEX_INIT); -- cgit v1.2.3